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
377f7213
Commit
377f7213
authored
Jan 18, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jan 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Add InterlockedOr().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aabdaed1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
lock.c
dlls/msvcrt/lock.c
+0
-9
winnt.h
include/winnt.h
+12
-0
No files found.
dlls/msvcrt/lock.c
View file @
377f7213
...
@@ -1157,15 +1157,6 @@ static inline void spin_wait_for_next_rwl(rwl_queue *q)
...
@@ -1157,15 +1157,6 @@ static inline void spin_wait_for_next_rwl(rwl_queue *q)
SpinWait_dtor
(
&
sw
);
SpinWait_dtor
(
&
sw
);
}
}
/* Remove when proper InterlockedOr implementation is added to wine */
static
LONG
InterlockedOr
(
LONG
*
d
,
LONG
v
)
{
LONG
l
;
while
(
~
(
l
=
*
d
)
&
v
)
if
(
InterlockedCompareExchange
(
d
,
l
|
v
,
l
)
==
l
)
break
;
return
l
;
}
static
LONG
InterlockedAnd
(
LONG
*
d
,
LONG
v
)
static
LONG
InterlockedAnd
(
LONG
*
d
,
LONG
v
)
{
{
LONG
l
=
*
d
,
old
;
LONG
l
=
*
d
,
old
;
...
...
include/winnt.h
View file @
377f7213
...
@@ -6905,6 +6905,7 @@ static inline BOOLEAN BitScanReverse(DWORD *index, DWORD mask)
...
@@ -6905,6 +6905,7 @@ static inline BOOLEAN BitScanReverse(DWORD *index, DWORD mask)
#pragma intrinsic(_InterlockedExchangeAdd)
#pragma intrinsic(_InterlockedExchangeAdd)
#pragma intrinsic(_InterlockedIncrement)
#pragma intrinsic(_InterlockedIncrement)
#pragma intrinsic(_InterlockedDecrement)
#pragma intrinsic(_InterlockedDecrement)
#pragma intrinsic(_InterlockedOr)
long
_InterlockedCompareExchange
(
long
volatile
*
,
long
,
long
);
long
_InterlockedCompareExchange
(
long
volatile
*
,
long
,
long
);
long
long
_InterlockedCompareExchange64
(
long
long
volatile
*
,
long
long
,
long
long
);
long
long
_InterlockedCompareExchange64
(
long
long
volatile
*
,
long
long
,
long
long
);
...
@@ -6915,6 +6916,7 @@ long _InterlockedDecrement(long volatile*);
...
@@ -6915,6 +6916,7 @@ long _InterlockedDecrement(long volatile*);
long
_InterlockedExchange
(
long
volatile
*
,
long
);
long
_InterlockedExchange
(
long
volatile
*
,
long
);
long
_InterlockedExchangeAdd
(
long
volatile
*
,
long
);
long
_InterlockedExchangeAdd
(
long
volatile
*
,
long
);
long
_InterlockedIncrement
(
long
volatile
*
);
long
_InterlockedIncrement
(
long
volatile
*
);
long
_InterlockedOr
(
long
volatile
*
,
long
);
static
FORCEINLINE
LONG
WINAPI
InterlockedCompareExchange
(
LONG
volatile
*
dest
,
LONG
xchg
,
LONG
compare
)
static
FORCEINLINE
LONG
WINAPI
InterlockedCompareExchange
(
LONG
volatile
*
dest
,
LONG
xchg
,
LONG
compare
)
{
{
...
@@ -6953,6 +6955,11 @@ static FORCEINLINE LONG WINAPI InterlockedDecrement( LONG volatile *dest )
...
@@ -6953,6 +6955,11 @@ static FORCEINLINE LONG WINAPI InterlockedDecrement( LONG volatile *dest )
return
_InterlockedDecrement
(
(
long
volatile
*
)
dest
);
return
_InterlockedDecrement
(
(
long
volatile
*
)
dest
);
}
}
static
FORCEINLINE
LONG
WINAPI
InterlockedOr
(
LONG
volatile
*
dest
,
LONG
val
)
{
return
_InterlockedOr
(
(
long
volatile
*
)
dest
,
val
);
}
#ifndef __i386__
#ifndef __i386__
#pragma intrinsic(_InterlockedCompareExchangePointer)
#pragma intrinsic(_InterlockedCompareExchangePointer)
...
@@ -7056,6 +7063,11 @@ static FORCEINLINE void * WINAPI InterlockedExchangePointer( void *volatile *des
...
@@ -7056,6 +7063,11 @@ static FORCEINLINE void * WINAPI InterlockedExchangePointer( void *volatile *des
return
ret
;
return
ret
;
}
}
static
FORCEINLINE
LONG
WINAPI
InterlockedOr
(
LONG
volatile
*
dest
,
LONG
val
)
{
return
__sync_fetch_and_or
(
dest
,
val
);
}
#endif
/* __GNUC__ */
#endif
/* __GNUC__ */
#ifdef __cplusplus
#ifdef __cplusplus
...
...
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