mirror of
https://git.code.sf.net/p/mingw-w64/mingw-w64
synced 2024-11-23 09:54:39 +08:00
headers: Add the _InterlockedCompareExchange8 intrinsic
Signed-off-by: TheShermanTanker <tanksherman27@gmail.com> Signed-off-by: LIU Hao <lh_mouse@126.com>
This commit is contained in:
parent
99684a9399
commit
9c534de9d1
@ -1157,7 +1157,7 @@ src_intrincs= \
|
||||
intrincs/bittest.c intrincs/bittestc.c intrincs/bittestci.c intrincs/bittestr.c intrincs/bittestri.c \
|
||||
intrincs/bittests.c intrincs/bittestsi.c intrincs/cpuid.c \
|
||||
intrincs/ilockadd.c intrincs/ilockand.c intrincs/ilockand64.c \
|
||||
intrincs/ilockcxch.c \
|
||||
intrincs/ilockcxch.c intrincs/ilockcxch8.c \
|
||||
intrincs/ilockcxch16.c intrincs/ilockcxch64.c intrincs/ilockcxchptr.c intrincs/ilockdec.c intrincs/ilockdec16.c \
|
||||
intrincs/ilockdec64.c intrincs/ilockexch.c intrincs/ilockexch64.c intrincs/ilockexchadd.c intrincs/ilockexchadd64.c \
|
||||
intrincs/ilockexchptr.c intrincs/ilockinc.c intrincs/ilockinc16.c intrincs/ilockinc64.c intrincs/ilockor.c \
|
||||
|
4
mingw-w64-crt/intrincs/ilockcxch8.c
Normal file
4
mingw-w64-crt/intrincs/ilockcxch8.c
Normal file
@ -0,0 +1,4 @@
|
||||
#define __INTRINSIC_ONLYSPECIAL
|
||||
#define __INTRINSIC_SPECIAL__InterlockedCompareExchange8
|
||||
|
||||
#include <intrin.h>
|
@ -1619,6 +1619,17 @@ __buildlogicali(_InterlockedXor, __LONG32, xor)
|
||||
#define __INTRINSIC_DEFINED__InterlockedXor
|
||||
#endif /* __INTRINSIC_PROLOG */
|
||||
|
||||
#if __INTRINSIC_PROLOG(_InterlockedCompareExchange8)
|
||||
char _InterlockedCompareExchange8(char volatile *destination, char exchange, char comperand);
|
||||
#if !__has_builtin(_InterlockedCompareExchange8)
|
||||
__INTRINSICS_USEINLINE
|
||||
char _InterlockedCompareExchange8(char volatile *destination, char exchange, char comperand) {
|
||||
return __sync_val_compare_and_swap(destination, comperand, exchange);
|
||||
}
|
||||
#endif
|
||||
#define __INTRINSIC_DEFINED__InterlockedCompareExchange8
|
||||
#endif /* __INTRINSIC_PROLOG */
|
||||
|
||||
#if __INTRINSIC_PROLOG(_InterlockedIncrement16)
|
||||
short _InterlockedIncrement16(short volatile *Addend);
|
||||
#if !__has_builtin(_InterlockedIncrement16)
|
||||
|
Loading…
Reference in New Issue
Block a user