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
a9524538
Commit
a9524538
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 MemoryBarrier().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
377f7213
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
1 deletion
+49
-1
winnt.h
include/winnt.h
+49
-1
No files found.
include/winnt.h
View file @
a9524538
...
...
@@ -6983,7 +6983,50 @@ static FORCEINLINE void * WINAPI InterlockedExchangePointer( void *volatile *des
return
(
void
*
)
_InterlockedExchange
(
(
long
volatile
*
)
dest
,
(
long
)
val
);
}
#endif
#endif
/* __i386__ */
#ifdef __i386__
static
FORCEINLINE
void
MemoryBarrier
(
void
)
{
LONG
dummy
;
InterlockedOr
(
&
dummy
,
0
);
}
#elif defined(__x86_64__)
#pragma intrinsic(__faststorefence)
void
__faststorefence
(
void
);
static
FORCEINLINE
void
MemoryBarrier
(
void
)
{
__faststorefence
();
}
#elif defined(__arm__)
#pragma intrinsic(__dmb)
void
__dmb
(
void
);
static
FORCEINLINE
void
MemoryBarrier
(
void
)
{
__dmb
(
_ARM_BARRIER_SY
);
}
#elif defined(__aarch64__)
#pragma intrinsic(__dmb)
void
__dmb
(
void
);
static
FORCEINLINE
void
MemoryBarrier
(
void
)
{
__dmb
(
_ARM64_BARRIER_SY
);
}
#endif
/* __i386__ */
#elif defined(__GNUC__)
...
...
@@ -7068,6 +7111,11 @@ static FORCEINLINE LONG WINAPI InterlockedOr( LONG volatile *dest, LONG val )
return
__sync_fetch_and_or
(
dest
,
val
);
}
static
FORCEINLINE
void
MemoryBarrier
(
void
)
{
__sync_synchronize
();
}
#endif
/* __GNUC__ */
#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