diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-10-09 13:45:56 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-10-09 13:45:56 +0200 |
commit | 6c6e9a0f3f7d454ba9553a750b195d7f99c7299a (patch) | |
tree | 7b42e894cbc58abc37fd4c9692394db15afb2217 /runtime/atomic.h | |
parent | 2ff697fe8de04ecd99e8470a7e7d8d1716980240 (diff) | |
download | rsyslog-6c6e9a0f3f7d454ba9553a750b195d7f99c7299a.tar.gz rsyslog-6c6e9a0f3f7d454ba9553a750b195d7f99c7299a.tar.xz rsyslog-6c6e9a0f3f7d454ba9553a750b195d7f99c7299a.zip |
moved bParseHostname and bIsParsed to msgFlags
This enables us to use more efficient calling conventions and
also helps us keep the on-disk structure of a msg object more
consistent in future releases.
Diffstat (limited to 'runtime/atomic.h')
-rw-r--r-- | runtime/atomic.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/atomic.h b/runtime/atomic.h index 2dbe7f52..7ad8e2e4 100644 --- a/runtime/atomic.h +++ b/runtime/atomic.h @@ -42,12 +42,14 @@ */ #ifdef HAVE_ATOMIC_BUILTINS # define ATOMIC_INC(data) ((void) __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)) # define ATOMIC_STORE_1_TO_32BIT(data) __sync_lock_test_and_set(&(data), 1) #else # warning "atomic builtins not available, using nul operations" # define ATOMIC_INC(data) (++(data)) +# define ATOMIC_DEC(data) (--(data)) # define ATOMIC_DEC_AND_FETCH(data) (--(data)) # define ATOMIC_FETCH_32BIT(data) (data) # define ATOMIC_STORE_1_TO_32BIT(data) (data) = 1 |