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
Kirill Smelkov
linux
Commits
443ac42a
Commit
443ac42a
authored
Nov 25, 2002
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] cmpxchg8b needs lock prefix
From 2.4
parent
9cb01e6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
include/asm-i386/system.h
include/asm-i386/system.h
+6
-1
No files found.
include/asm-i386/system.h
View file @
443ac42a
...
...
@@ -150,6 +150,11 @@ struct __xchg_dummy { unsigned long a[100]; };
* to do an SIMD/3DNOW!/MMX/FPU 64-bit store here, but that
* might have an implicit FPU-save as a cost, so it's not
* clear which path to go.)
*
* cmpxchg8b must be used with the lock prefix here to allow
* the instruction to be executed atomically, see page 3-102
* of the instruction set reference 24319102.pdf. We need
* the reader side to see the coherent 64bit value.
*/
static
inline
void
__set_64bit
(
unsigned
long
long
*
ptr
,
unsigned
int
low
,
unsigned
int
high
)
...
...
@@ -158,7 +163,7 @@ static inline void __set_64bit (unsigned long long * ptr,
"
\n
1:
\t
"
"movl (%0), %%eax
\n\t
"
"movl 4(%0), %%edx
\n\t
"
"cmpxchg8b (%0)
\n\t
"
"
lock
cmpxchg8b (%0)
\n\t
"
"jnz 1b"
:
/* no outputs */
:
"D"
(
ptr
),
...
...
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