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
abf29377
Commit
abf29377
authored
Feb 05, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Export InterlockedCompareExchange64.
parent
98ca10c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
kernel32.spec
dlls/kernel32/kernel32.spec
+1
-0
winbase.h
include/winbase.h
+15
-0
No files found.
dlls/kernel32/kernel32.spec
View file @
abf29377
...
...
@@ -726,6 +726,7 @@
@ stdcall InitializeCriticalSectionEx(ptr long long)
@ stdcall InitializeSListHead(ptr) ntdll.RtlInitializeSListHead
@ stdcall -arch=i386 InterlockedCompareExchange (ptr long long)
@ stdcall -arch=i386 -ret64 InterlockedCompareExchange64(ptr double double) ntdll.RtlInterlockedCompareExchange64
@ stdcall -arch=i386 InterlockedDecrement(ptr)
@ stdcall -arch=i386 InterlockedExchange(ptr long)
@ stdcall -arch=i386 InterlockedExchangeAdd (ptr long )
...
...
include/winbase.h
View file @
abf29377
...
...
@@ -2376,6 +2376,8 @@ static inline PVOID WINAPI InterlockedExchangePointer( PVOID volatile *dest, PVO
return
(
PVOID
)
InterlockedExchange
(
(
LONG
volatile
*
)
dest
,
(
LONG
)
val
);
}
WINBASEAPI
LONGLONG
WINAPI
InterlockedCompareExchange64
(
LONGLONG
volatile
*
,
LONGLONG
,
LONGLONG
);
#else
/* __i386__ */
static
inline
LONG
WINAPI
InterlockedCompareExchange
(
LONG
volatile
*
dest
,
LONG
xchg
,
LONG
compare
)
...
...
@@ -2404,6 +2406,19 @@ static inline PVOID WINAPI InterlockedCompareExchangePointer( PVOID volatile *de
#endif
}
static
inline
LONGLONG
WINAPI
InterlockedCompareExchange64
(
LONGLONG
volatile
*
dest
,
LONGLONG
xchg
,
LONGLONG
compare
)
{
#if defined(__x86_64__) && defined(__GNUC__)
LONGLONG
ret
;
__asm__
__volatile__
(
"lock; cmpxchgq %2,(%1)"
:
"=a"
(
ret
)
:
"r"
(
dest
),
"r"
(
xchg
),
"0"
(
compare
)
:
"memory"
);
return
ret
;
#else
extern
__int64
interlocked_cmpxchg64
(
__int64
*
dest
,
__int64
xchg
,
__int64
compare
);
return
interlocked_cmpxchg64
(
(
__int64
*
)
dest
,
xchg
,
compare
);
#endif
}
static
inline
LONG
WINAPI
InterlockedExchange
(
LONG
volatile
*
dest
,
LONG
val
)
{
#if defined(__x86_64__) && defined(__GNUC__)
...
...
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