mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
Fix a potential bug when using __sync_lock_test_and_set()
TYPE __sync_lock_test_and_set (TYPE *ptr, TYPE value, ...) it is not documented what happens if the two arguments are of different type like it was before: the first one was lock_word_t (byte) and the second one was 1 or 0 (int). Approved by: Marko (via IRC)
This commit is contained in:
parent
3b0b15c5aa
commit
d70cbd6c61
1 changed files with 1 additions and 1 deletions
|
@ -330,7 +330,7 @@ amount of increment. */
|
|||
Returns the old value of *ptr, atomically sets *ptr to new_val */
|
||||
|
||||
# define os_atomic_test_and_set_byte(ptr, new_val) \
|
||||
__sync_lock_test_and_set(ptr, new_val)
|
||||
__sync_lock_test_and_set(ptr, (byte) new_val)
|
||||
|
||||
#elif defined(HAVE_IB_SOLARIS_ATOMICS)
|
||||
|
||||
|
|
Loading…
Reference in a new issue