diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-09-19 17:41:11 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-09-19 17:41:11 +0200 |
commit | bc70a730194759e85f9c3641573c46b4a8476198 (patch) | |
tree | 91dc51ac59a8ed32b83afdff777c80578e050030 /runtime/atomic.h | |
parent | 4c96ebdcfe075e80810b01257cf21ea1c9b3ec0e (diff) | |
download | rsyslog-bc70a730194759e85f9c3641573c46b4a8476198.tar.gz rsyslog-bc70a730194759e85f9c3641573c46b4a8476198.tar.bz2 rsyslog-bc70a730194759e85f9c3641573c46b4a8476198.zip |
bugfix: proper synchronization on message destruction
The code was potentially race, at least on systems where
a memory barrier was needed. Fix not fully tested yet.
Diffstat (limited to 'runtime/atomic.h')
-rw-r--r-- | runtime/atomic.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/atomic.h b/runtime/atomic.h index d15f78ee..2dbe7f52 100644 --- a/runtime/atomic.h +++ b/runtime/atomic.h @@ -48,6 +48,7 @@ #else # warning "atomic builtins not available, using nul operations" # define ATOMIC_INC(data) (++(data)) +# define ATOMIC_DEC_AND_FETCH(data) (--(data)) # define ATOMIC_FETCH_32BIT(data) (data) # define ATOMIC_STORE_1_TO_32BIT(data) (data) = 1 #endif |