Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
e08a1b53
Commit
e08a1b53
authored
Aug 17, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made the Interlocked*Pointer functions static inline since they aren't
exported by the Windows API.
parent
e22a1e68
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
24 deletions
+12
-24
winbase.h
include/winbase.h
+11
-23
critsection.c
scheduler/critsection.c
+1
-1
No files found.
include/winbase.h
View file @
e08a1b53
...
...
@@ -1952,24 +1952,6 @@ extern inline LONG WINAPI InterlockedExchange( PLONG dest, LONG val )
return
ret
;
}
extern
inline
PVOID
WINAPI
InterlockedCompareExchangePointer
(
PVOID
*
dest
,
PVOID
xchg
,
PVOID
compare
);
extern
inline
PVOID
WINAPI
InterlockedCompareExchangePointer
(
PVOID
*
dest
,
PVOID
xchg
,
PVOID
compare
)
{
PVOID
ret
;
__asm__
__volatile__
(
"lock; cmpxchgl %2,(%1)"
:
"=a"
(
ret
)
:
"r"
(
dest
),
"r"
(
xchg
),
"0"
(
compare
)
:
"memory"
);
return
ret
;
}
extern
inline
PVOID
WINAPI
InterlockedExchangePointer
(
PVOID
*
dest
,
PVOID
val
);
extern
inline
PVOID
WINAPI
InterlockedExchangePointer
(
PVOID
*
dest
,
PVOID
val
)
{
PVOID
ret
;
__asm__
__volatile__
(
"lock; xchgl %0,(%1)"
:
"=r"
(
ret
)
:
"r"
(
dest
),
"0"
(
val
)
:
"memory"
);
return
ret
;
}
extern
inline
LONG
WINAPI
InterlockedExchangeAdd
(
PLONG
dest
,
LONG
incr
);
extern
inline
LONG
WINAPI
InterlockedExchangeAdd
(
PLONG
dest
,
LONG
incr
)
{
...
...
@@ -2040,13 +2022,19 @@ LONG WINAPI InterlockedExchange(PLONG,LONG);
LONG
WINAPI
InterlockedExchangeAdd
(
PLONG
,
LONG
);
LONG
WINAPI
InterlockedIncrement
(
PLONG
);
VOID
WINAPI
SetLastError
(
DWORD
);
/* FIXME: should handle platforms where sizeof(void*) != sizeof(long) */
#define InterlockedCompareExchangePointer(a,b,c) \
((PVOID)InterlockedCompareExchange((PLONG)(a),(LONG)(b),(LONG)(c)))
#define InterlockedExchangePointer(a,b) \
((PVOID)InterlockedExchange((PLONG)(a),(LONG)(b)))
#endif
/* __i386__ && __GNUC__ */
/* FIXME: should handle platforms where sizeof(void*) != sizeof(long) */
static
inline
PVOID
WINAPI
InterlockedCompareExchangePointer
(
PVOID
*
dest
,
PVOID
xchg
,
PVOID
compare
)
{
return
(
PVOID
)
InterlockedCompareExchange
(
(
PLONG
)
dest
,
(
LONG
)
xchg
,
(
LONG
)
compare
);
}
static
inline
PVOID
WINAPI
InterlockedExchangePointer
(
PVOID
*
dest
,
PVOID
val
)
{
return
(
PVOID
)
InterlockedExchange
(
(
PLONG
)
dest
,
(
LONG
)
val
);
}
#ifdef __WINE__
#define GetCurrentProcess() ((HANDLE)0xffffffff)
#define GetCurrentThread() ((HANDLE)0xfffffffe)
...
...
scheduler/critsection.c
View file @
e08a1b53
...
...
@@ -86,7 +86,7 @@ void WINAPI UninitializeCriticalSection( CRITICAL_SECTION *crit )
/***********************************************************************
* InterlockedCompareExchange (KERNEL32.@)
*/
/*
PVOID WINAPI InterlockedCompareExchange( PVOID *dest, PVOID xchg, PVOID
compare ); */
/*
LONG WINAPI InterlockedCompareExchange( PLONG dest, LONG xchg, LONG
compare ); */
__ASM_GLOBAL_FUNC
(
InterlockedCompareExchange
,
"movl 12(%esp),%eax
\n\t
"
"movl 8(%esp),%ecx
\n\t
"
...
...
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