summaryrefslogtreecommitdiffstats
path: root/runtime/atomic.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-06-25 17:09:51 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-25 17:09:51 +0200
commit12dc91a157cf2375596920c1f4f7c361ad717103 (patch)
treefe2976eae8583b979d618386d78776e3b37eb341 /runtime/atomic.h
parent1f79c785975261e4158c9b85f6451d5bd00b2495 (diff)
downloadrsyslog-12dc91a157cf2375596920c1f4f7c361ad717103.tar.gz
rsyslog-12dc91a157cf2375596920c1f4f7c361ad717103.tar.xz
rsyslog-12dc91a157cf2375596920c1f4f7c361ad717103.zip
backported "clean" increment of memory trim counter (not protected by mutex)
Diffstat (limited to 'runtime/atomic.h')
-rw-r--r--runtime/atomic.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/atomic.h b/runtime/atomic.h
index f5ae9357..d5aaf56b 100644
--- a/runtime/atomic.h
+++ b/runtime/atomic.h
@@ -42,6 +42,7 @@
*/
#ifdef HAVE_ATOMIC_BUILTINS
# define ATOMIC_INC(data) ((void) __sync_fetch_and_add(&(data), 1))
+# define ATOMIC_INC_AND_FETCH(data) __sync_fetch_and_add(&(data), 1)
# define ATOMIC_DEC(data) ((void) __sync_sub_and_fetch(&(data), 1))
# define ATOMIC_DEC_AND_FETCH(data) __sync_sub_and_fetch(&(data), 1)
# define ATOMIC_FETCH_32BIT(data) ((unsigned) __sync_fetch_and_and(&(data), 0xffffffff))