minor update

This commit is contained in:
Felix von Leitner 2012-08-18 01:31:21 +00:00
parent c5a5c2d6bf
commit fe4e8dab35
1 changed files with 1 additions and 1 deletions

2
CAS.h
View File

@ -53,7 +53,7 @@ static inline size_t atomic_add_return(size_t* x,size_t val) {
/* *x += val; */
static inline void atomic_add(size_t* x,size_t val) {
#ifdef USE_BUILTINS
__sync_add_and_fetch(x,val);
return __sync_add_and_fetch(x,val);
#elif defined(__i386__)
asm volatile ("lock; addl %1, %0" : "+m" (*x) : "ir" (val) );
#elif defined(__x86_64__)