* include/winnt.h (MemoryBarrier): Add definition.
This commit is contained in:
parent
458e15e7d7
commit
47bc176b42
|
@ -15,6 +15,7 @@
|
||||||
LONG WINAPI to LONG __cdecl to match Microsoft documentation.
|
LONG WINAPI to LONG __cdecl to match Microsoft documentation.
|
||||||
(InterlockedIncrement): Ditto.
|
(InterlockedIncrement): Ditto.
|
||||||
(InterlockedExchange): Ditto.
|
(InterlockedExchange): Ditto.
|
||||||
|
* include/winnt.h (MemoryBarrier): Add definition.
|
||||||
|
|
||||||
2012-07-29 Earnie Boyd <earnie@users.sourceforge.net>
|
2012-07-29 Earnie Boyd <earnie@users.sourceforge.net>
|
||||||
|
|
||||||
|
|
|
@ -4035,6 +4035,22 @@ struct _TEB * NtCurrentTeb(void);
|
||||||
#endif /* __GNUC__ */
|
#endif /* __GNUC__ */
|
||||||
#endif /* _X86_ */
|
#endif /* _X86_ */
|
||||||
|
|
||||||
|
#if _WIN32_WINNT >= _WIN32_WINNT_VISTA
|
||||||
|
# if defined(_AMD64_) || defined(__X86_64)
|
||||||
|
# define MemoryBarrier __faststorefence
|
||||||
|
# elif defined(_IA64_)
|
||||||
|
# define MemoryBarrier __mf
|
||||||
|
# else
|
||||||
|
FORCEINLINE VOID MemoryBarrier (VOID) {
|
||||||
|
LONG Barrier = 0;
|
||||||
|
__asm__ __volatile__("xchgl %%eax,%0 "
|
||||||
|
:"=r" (Barrier));
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define MemoryBarrier
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* RC_INVOKED */
|
#endif /* RC_INVOKED */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
Loading…
Reference in New Issue