Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
c2ef2edf
Commit
c2ef2edf
authored
Jan 16, 2013
by
André Hentschel
Committed by
Alexandre Julliard
Jan 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libport: Implemented the interlocked_cmpxchg128 function for ARM64.
parent
16954b3a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
interlocked.c
libs/port/interlocked.c
+22
-0
No files found.
libs/port/interlocked.c
View file @
c2ef2edf
...
...
@@ -313,6 +313,28 @@ __int64 interlocked_cmpxchg64( __int64 *dest, __int64 xchg, __int64 compare )
return
compare
;
}
#ifdef __aarch64__
int
interlocked_cmpxchg128
(
__int64
*
dest
,
__int64
xchg_high
,
__int64
xchg_low
,
__int64
*
compare
)
{
int
retv
;
pthread_mutex_lock
(
&
interlocked_mutex
);
if
(
dest
[
0
]
==
compare
[
0
]
&&
dest
[
1
]
==
compare
[
1
])
{
dest
[
0
]
=
xchg_low
;
dest
[
1
]
=
xchg_high
;
retv
=
1
;
}
else
{
compare
[
0
]
=
dest
[
0
];
compare
[
1
]
=
dest
[
1
];
retv
=
0
;
}
pthread_mutex_unlock
(
&
interlocked_mutex
);
return
retv
;
}
#endif
int
interlocked_xchg
(
int
*
dest
,
int
val
)
{
int
retv
;
...
...
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