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
c49fb1ec
Commit
c49fb1ec
authored
Apr 28, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winbase.h: Support using int for LONG in MSVC interlocked functions.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9a4bf42e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
15 deletions
+38
-15
winbase.h
include/winbase.h
+38
-15
No files found.
include/winbase.h
View file @
c49fb1ec
...
...
@@ -2913,19 +2913,42 @@ extern WCHAR * CDECL wine_get_dos_file_name( LPCSTR str );
#pragma intrinsic(_InterlockedIncrement)
#pragma intrinsic(_InterlockedDecrement)
#define InterlockedCompareExchange _InterlockedCompareExchange
#define InterlockedCompareExchange64 _InterlockedCompareExchange64
#define InterlockedExchange _InterlockedExchange
#define InterlockedExchangeAdd _InterlockedExchangeAdd
#define InterlockedIncrement _InterlockedIncrement
#define InterlockedDecrement _InterlockedDecrement
long
InterlockedCompareExchange
(
long
volatile
*
,
long
,
long
);
long
long
InterlockedCompareExchange64
(
long
long
volatile
*
,
long
long
,
long
long
);
long
InterlockedDecrement
(
long
volatile
*
);
long
InterlockedExchange
(
long
volatile
*
,
long
);
long
InterlockedExchangeAdd
(
long
volatile
*
,
long
);
long
InterlockedIncrement
(
long
volatile
*
);
long
_InterlockedCompareExchange
(
long
volatile
*
,
long
,
long
);
long
long
_InterlockedCompareExchange64
(
long
long
volatile
*
,
long
long
,
long
long
);
long
_InterlockedDecrement
(
long
volatile
*
);
long
_InterlockedExchange
(
long
volatile
*
,
long
);
long
_InterlockedExchangeAdd
(
long
volatile
*
,
long
);
long
_InterlockedIncrement
(
long
volatile
*
);
static
FORCEINLINE
LONG
WINAPI
InterlockedCompareExchange
(
LONG
volatile
*
dest
,
LONG
xchg
,
LONG
compare
)
{
return
_InterlockedCompareExchange
(
(
long
volatile
*
)
dest
,
xchg
,
compare
);
}
static
FORCEINLINE
LONGLONG
WINAPI
InterlockedCompareExchange64
(
LONGLONG
volatile
*
dest
,
LONGLONG
xchg
,
LONGLONG
compare
)
{
return
_InterlockedCompareExchange64
(
(
long
long
volatile
*
)
dest
,
compare
,
xchg
);
}
static
FORCEINLINE
LONG
WINAPI
InterlockedExchange
(
LONG
volatile
*
dest
,
LONG
val
)
{
return
_InterlockedExchange
(
(
long
volatile
*
)
dest
,
val
);
}
static
FORCEINLINE
LONG
WINAPI
InterlockedExchangeAdd
(
LONG
volatile
*
dest
,
LONG
incr
)
{
return
_InterlockedExchangeAdd
(
(
long
volatile
*
)
dest
,
incr
);
}
static
FORCEINLINE
LONG
WINAPI
InterlockedIncrement
(
LONG
volatile
*
dest
)
{
return
_InterlockedIncrement
(
(
long
volatile
*
)
dest
);
}
static
FORCEINLINE
LONG
WINAPI
InterlockedDecrement
(
LONG
volatile
*
dest
)
{
return
_InterlockedDecrement
(
(
long
volatile
*
)
dest
);
}
#ifndef __i386__
...
...
@@ -2942,12 +2965,12 @@ void *InterlockedExchangePointer(void *volatile*,void*);
static
FORCEINLINE
void
*
WINAPI
InterlockedCompareExchangePointer
(
void
*
volatile
*
dest
,
void
*
xchg
,
void
*
compare
)
{
return
(
void
*
)
InterlockedCompareExchange
(
(
long
volatile
*
)
dest
,
(
long
)
xchg
,
(
long
)
compare
);
return
(
void
*
)
_
InterlockedCompareExchange
(
(
long
volatile
*
)
dest
,
(
long
)
xchg
,
(
long
)
compare
);
}
static
FORCEINLINE
void
*
WINAPI
InterlockedExchangePointer
(
void
*
volatile
*
dest
,
void
*
val
)
{
return
(
void
*
)
InterlockedExchange
(
(
long
volatile
*
)
dest
,
(
long
)
val
);
return
(
void
*
)
_
InterlockedExchange
(
(
long
volatile
*
)
dest
,
(
long
)
val
);
}
#endif
...
...
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