diff options
author | Vasil Dimov <vasil.dimov@oracle.com> | 2010-09-30 13:26:18 +0300 |
---|---|---|
committer | Vasil Dimov <vasil.dimov@oracle.com> | 2010-09-30 13:26:18 +0300 |
commit | 51cdf59546be883119b5a00e10c8c1b0f5362761 (patch) | |
tree | a490646120717786ebd7d78c8bcf89e51116e25c /storage | |
parent | 3de0aa061b6bec17c78c37d04f6fa99b111f5115 (diff) | |
download | mariadb-git-51cdf59546be883119b5a00e10c8c1b0f5362761.tar.gz |
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)
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innodb_plugin/include/os0sync.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/innodb_plugin/include/os0sync.h b/storage/innodb_plugin/include/os0sync.h index 0c22162b900..f32e7ab710a 100644 --- a/storage/innodb_plugin/include/os0sync.h +++ b/storage/innodb_plugin/include/os0sync.h @@ -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) |