Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
6e57a3a8
Commit
6e57a3a8
authored
Mar 28, 2006
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Implement futex_atomic_cmpxchg_inatomic().
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
329b10bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
include/asm-sparc64/futex.h
include/asm-sparc64/futex.h
+20
-2
No files found.
include/asm-sparc64/futex.h
View file @
6e57a3a8
...
...
@@ -84,9 +84,27 @@ static inline int futex_atomic_op_inuser(int encoded_op, int __user *uaddr)
}
static
inline
int
futex_atomic_cmpxchg_in
user
(
int
__user
*
uaddr
,
int
oldval
,
int
newval
)
futex_atomic_cmpxchg_in
atomic
(
int
__user
*
uaddr
,
int
oldval
,
int
newval
)
{
return
-
ENOSYS
;
__asm__
__volatile__
(
"
\n
1: lduwa [%2] %%asi, %0
\n
"
"2: casa [%2] %%asi, %0, %1
\n
"
"3:
\n
"
" .section .fixup,#alloc,#execinstr
\n
"
" .align 4
\n
"
"4: ba 3b
\n
"
" mov %3, %0
\n
"
" .previous
\n
"
" .section __ex_table,
\"
a
\"\n
"
" .align 4
\n
"
" .word 1b, 4b
\n
"
" .word 2b, 4b
\n
"
" .previous
\n
"
:
"=&r"
(
oldval
)
:
"r"
(
newval
),
"r"
(
uaddr
),
"i"
(
-
EFAULT
)
:
"memory"
);
return
oldval
;
}
#endif
/* !(_SPARC64_FUTEX_H) */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment