Improvements based on feedback from Anthony Williams

This commit is contained in:
Sam Lantinga 2011-01-25 17:40:06 -08:00
parent c8cd5b9028
commit 29e0bf97e0
4 changed files with 93 additions and 126 deletions

View file

@ -301,6 +301,7 @@ if test x$enable_gcc_atomics = xyes; then
int a;
void *x, *y, *z;
__sync_lock_test_and_set(&a, 4);
__sync_lock_test_and_set(&x, y);
__sync_fetch_and_add(&a, 1);
__sync_bool_compare_and_swap(&a, 5, 10);
__sync_bool_compare_and_swap(&x, y, z);
@ -317,6 +318,7 @@ if test x$enable_gcc_atomics = xyes; then
],[
int a;
__sync_lock_test_and_set(&a, 1);
__sync_lock_release(&a);
],[
have_gcc_sync_lock_test_and_set=yes
])