Add InterlockedAdd compiler intrinsic
Original Reporter info from Mantis: Bi0T1N @Bi0T1N
-
Reporter name: Bi0T1N
Original Reporter info from Mantis: Bi0T1N @Bi0T1N
- Reporter name: Bi0T1N
Description:
The InterlockedAdd intrinsic should perform an atomic addition operation with the specified values.
It works like the InterlockedIncrement/InterlockedDecrement function, just with a second operand - the number instead of using hardcoded 1/-1 in the assembler.
Additionally InterlockedIncrement/InterlockedDecrement could be replaced by InterlockedAdd.
Additional information:
https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html#g_t_005f_005fatomic-Builtins (__atomic_add_fetch )
https://docs.microsoft.com/en-us/windows/win32/api/winnt/nf-winnt-interlockedadd
Mantis conversion info:
- Mantis ID: 37139
- Version: 3.3.1
- Monitored by: » Vincent (Vincent Snijders), » @sergy.larin (Sergey Larin)