diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-09-23 14:41:02 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-09-23 14:41:02 +0200 |
commit | 47a2593ae4e2d4077b4a9e8c77a2b686abfa8d2c (patch) | |
tree | 5a2a9363f8f93ce0a4f1d58b8b74d86cc5a5b80d /runtime/msg.c | |
parent | bbf0f952a1d5456e9ce745e21d63d5421328db64 (diff) | |
download | rsyslog-47a2593ae4e2d4077b4a9e8c77a2b686abfa8d2c.tar.gz rsyslog-47a2593ae4e2d4077b4a9e8c77a2b686abfa8d2c.tar.xz rsyslog-47a2593ae4e2d4077b4a9e8c77a2b686abfa8d2c.zip |
atomic memory access calls re-enabled in msg.c
destructor not yet permitted because verification is
missing that a atomic opration is sufficient for the
job required
Diffstat (limited to 'runtime/msg.c')
-rw-r--r-- | runtime/msg.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/msg.c b/runtime/msg.c index 346bbc5f..d5e1fde9 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -273,12 +273,12 @@ BEGINobjDestruct(msg) /* be sure to specify the object type also in END and CODE int currRefCount; CODESTARTobjDestruct(msg) /* DEV Debugging only ! dbgprintf("msgDestruct\t0x%lx, Ref now: %d\n", (unsigned long)pM, pM->iRefCount - 1); */ -# ifdef DO_HAVE_ATOMICS - currRefCount = ATOMIC_DEC_AND_FETCH(pThis->iRefCount); -# else +//# ifdef DO_HAVE_ATOMICS +// currRefCount = ATOMIC_DEC_AND_FETCH(pThis->iRefCount); +//# else MsgLock(pThis); currRefCount = --pThis->iRefCount; -# endif +//# endif // we need a mutex, because we may be suspended after getting the refcount but before if(currRefCount == 0) { @@ -487,7 +487,7 @@ finalize_it: msg_t *MsgAddRef(msg_t *pM) { assert(pM != NULL); -# ifdef DO_HAVE_ATOMICS +# ifdef HAVE_ATOMIC_BUILTINS ATOMIC_INC(pM->iRefCount); # else MsgLock(pM); |