u_atomic: Implement p_atomic_xchg for Windows
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17529>
This commit is contained in:
parent
1c2ca3cfb7
commit
104c301658
|
@ -166,6 +166,12 @@
|
|||
sizeof *(_v) == sizeof(__int64) ? InterlockedCompareExchange64 ((__int64 *)(_v), (__int64)(_new), (__int64)(_old)) : \
|
||||
(assert(!"should not get here"), 0))
|
||||
|
||||
#define PIPE_NATIVE_ATOMIC_XCHG
|
||||
#define p_atomic_xchg(_v, _new) (\
|
||||
sizeof *(_v) == sizeof(long) ? InterlockedExchange ((long *) (_v), (long) (_new)) : \
|
||||
sizeof *(_v) == sizeof(__int64) ? InterlockedExchange64((__int64 *)(_v), (__int64)(_new)) : \
|
||||
(assert(!"should not get here"), 0))
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(PIPE_ATOMIC_OS_SOLARIS)
|
||||
|
|
Loading…
Reference in New Issue