X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=urcu%2Fuatomic_generic.h;h=f65b398988143a126a664635ad3bbcf8ce1fefeb;hb=a2c502feb1f1510eef3234168bc16a98404694bf;hp=9ee7b7bdc22a6bedeef45ef6447d930162375c99;hpb=f469d83969772a24539eaa24430bc73347a882a3;p=urcu.git diff --git a/urcu/uatomic_generic.h b/urcu/uatomic_generic.h index 9ee7b7b..f65b398 100644 --- a/urcu/uatomic_generic.h +++ b/urcu/uatomic_generic.h @@ -28,10 +28,6 @@ extern "C" { #endif -#ifndef BITS_PER_LONG -#define BITS_PER_LONG (__SIZEOF_LONG__ * 8) -#endif - #ifndef uatomic_set #define uatomic_set(addr, v) STORE_SHARED(*(addr), (v)) #endif @@ -162,9 +158,9 @@ unsigned long _uatomic_exchange(void *addr, unsigned long val, int len) do { old = uatomic_read((unsigned int *)addr); - while (!__sync_bool_compare_and_swap_4(addr, old, val)); + } while (!__sync_bool_compare_and_swap_4(addr, old, val)); - } return old; + return old; } #if (BITS_PER_LONG == 64) case 8: