mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
include: Add ReadNoFence64 inline helpers.
This commit is contained in:
parent
fac940dfac
commit
f82b1c1fcf
1 changed files with 16 additions and 0 deletions
|
@ -7082,11 +7082,14 @@ static FORCEINLINE void MemoryBarrier(void)
|
|||
*/
|
||||
#if _MSC_VER >= 1700
|
||||
#pragma intrinsic(__iso_volatile_load32)
|
||||
#pragma intrinsic(__iso_volatile_load64)
|
||||
#pragma intrinsic(__iso_volatile_store32)
|
||||
#define __WINE_LOAD32_NO_FENCE(src) (__iso_volatile_load32(src))
|
||||
#define __WINE_LOAD64_NO_FENCE(src) (__iso_volatile_load64(src))
|
||||
#define __WINE_STORE32_NO_FENCE(dest, value) (__iso_volatile_store32(dest, value))
|
||||
#else /* _MSC_VER >= 1700 */
|
||||
#define __WINE_LOAD32_NO_FENCE(src) (*(src))
|
||||
#define __WINE_LOAD64_NO_FENCE(src) (*(src))
|
||||
#define __WINE_STORE32_NO_FENCE(dest, value) ((void)(*(dest) = (value)))
|
||||
#endif /* _MSC_VER >= 1700 */
|
||||
|
||||
|
@ -7120,6 +7123,12 @@ static FORCEINLINE LONG ReadNoFence( LONG const volatile *src )
|
|||
return value;
|
||||
}
|
||||
|
||||
static FORCEINLINE LONG64 ReadNoFence64( LONG64 const volatile *src )
|
||||
{
|
||||
LONG64 value = __WINE_LOAD64_NO_FENCE( (__int64 const volatile *)src );
|
||||
return value;
|
||||
}
|
||||
|
||||
static FORCEINLINE void WriteRelease( LONG volatile *dest, LONG value )
|
||||
{
|
||||
__wine_memory_barrier_acq_rel();
|
||||
|
@ -7306,6 +7315,13 @@ static FORCEINLINE LONG ReadNoFence( LONG const volatile *src )
|
|||
return value;
|
||||
}
|
||||
|
||||
static FORCEINLINE LONG64 ReadNoFence64( LONG64 const volatile *src )
|
||||
{
|
||||
LONG64 value;
|
||||
__WINE_ATOMIC_LOAD_RELAXED( src, &value );
|
||||
return value;
|
||||
}
|
||||
|
||||
static FORCEINLINE void WriteRelease( LONG volatile *dest, LONG value )
|
||||
{
|
||||
__WINE_ATOMIC_STORE_RELEASE( dest, &value );
|
||||
|
|
Loading…
Reference in a new issue