This function atomically assigns the value of __v to the variable that __p points to.
An acquire memory barrier is created when this function is invoked.
T __sync_lock_test_and_set (T* __p, T __v, ...);
where T is one of the data types listed in Supported data types.
- The pointer of the variable that is to be set.
- The value to set to the variable that __p points to.
The function returns the initial value of the variable that __p points to.