You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
include: co/atomic.h.
#Arithmetic operations #atomic_inc template inline T atomic_inc(T* p); Atomic increment, T is any integer type with a length of 1, 2, 4, 8 bytes, and the parameter p is a pointer of type T.
This function performs an increment operation on the integer pointed to by p and returns the result after increment.
Example
int i = 0; uint64 u = 0; int r = atomic_inc(&i); // i -> 1, r = 1 uint64 x = atomic_inc(&u); // u -> 1, x = 1 #atomic_fetch_inc template inline T atomic_fetch_inc(T* p); The same as atomic_inc, but returns the value before increment.
The text was updated successfully, but these errors were encountered:
https://idealvin.github.io/en/co/atomic/
include: co/atomic.h.
#Arithmetic operations #atomic_inc template inline T atomic_inc(T* p); Atomic increment, T is any integer type with a length of 1, 2, 4, 8 bytes, and the parameter p is a pointer of type T.
This function performs an increment operation on the integer pointed to by p and returns the result after increment.
Example
int i = 0; uint64 u = 0; int r = atomic_inc(&i); // i -> 1, r = 1 uint64 x = atomic_inc(&u); // u -> 1, x = 1 #atomic_fetch_inc template inline T atomic_fetch_inc(T* p); The same as atomic_inc, but returns the value before increment.
The text was updated successfully, but these errors were encountered: