Skip to content

Commit

Permalink
restored the old ATOMIC_READ() behaviour
Browse files Browse the repository at this point in the history
this change is quite irrelevant but restored for consistency
(and anyway fetching the value is the main action)
  • Loading branch information
xant committed Jun 12, 2014
1 parent 853204a commit 43a756d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/atomic_defs.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef __ATOMIC_DEFS_H__
#define __ATOMIC_DEFS_H__

#define ATOMIC_READ(__v) __sync_add_and_fetch(&(__v), 0)
#define ATOMIC_READ(__v) __sync_fetch_and_add(&(__v), 0)
#define ATOMIC_INCREMENT(__v) __sync_fetch_and_add(&(__v), 1)
#define ATOMIC_DECREMENT(__v) __sync_fetch_and_sub(&(__v), 1)
#define ATOMIC_INCREASE(__v, __n) __sync_add_and_fetch(&(__v), (__n))
Expand Down

0 comments on commit 43a756d

Please sign in to comment.