summaryrefslogtreecommitdiffstats
path: root/runtime/atomic.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-01-30 13:49:41 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-01-30 13:49:41 +0100
commit2cfaf5f86a4fb40cc37ae71118c506f1d924df13 (patch)
tree4ddc545b4d091885404f04c7fa06cc199e752c8e /runtime/atomic.h
parentce11f7bdb8db977a8b00b28d9b84d1b1c924f3c3 (diff)
downloadrsyslog-2cfaf5f86a4fb40cc37ae71118c506f1d924df13.tar.gz
rsyslog-2cfaf5f86a4fb40cc37ae71118c506f1d924df13.tar.xz
rsyslog-2cfaf5f86a4fb40cc37ae71118c506f1d924df13.zip
bugfix: inconsistent use of mutex/atomic operations could cause segfault
details are too many, for full analysis see blog post at: http://blog.gerhards.net/2009/01/rsyslog-data-race-analysis.html
Diffstat (limited to 'runtime/atomic.h')
-rw-r--r--runtime/atomic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/atomic.h b/runtime/atomic.h
index 2dbe7f52..2c20e0c3 100644
--- a/runtime/atomic.h
+++ b/runtime/atomic.h
@@ -46,7 +46,7 @@
# define ATOMIC_FETCH_32BIT(data) ((unsigned) __sync_fetch_and_and(&(data), 0xffffffff))
# define ATOMIC_STORE_1_TO_32BIT(data) __sync_lock_test_and_set(&(data), 1)
#else
-# warning "atomic builtins not available, using nul operations"
+# warning "atomic builtins not available, using nul operations - rsyslogd will probably be racy!"
# define ATOMIC_INC(data) (++(data))
# define ATOMIC_DEC_AND_FETCH(data) (--(data))
# define ATOMIC_FETCH_32BIT(data) (data)