diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-06-08 15:20:33 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-06-08 15:20:33 +0200 |
commit | 11bd517465360278b270ee7c18607b4d1d97e44e (patch) | |
tree | 429d9fda28dd132c8b592738d955cd34a56e823e /runtime | |
parent | 3e49a1075ab6750135e1a38cf0c213579fa30b4a (diff) | |
download | rsyslog-11bd517465360278b270ee7c18607b4d1d97e44e.tar.gz rsyslog-11bd517465360278b270ee7c18607b4d1d97e44e.tar.xz rsyslog-11bd517465360278b270ee7c18607b4d1d97e44e.zip |
added support for high-performance action queue submission if not all mark messages should be logged
this was previously not properly handeld. This is also the first occurence of
a (real) CAS loop inside rsyslog. Note that the performance is now very well
in the default configuration, and mark message directives are still correctly
being handled. So this code looks close to final, but needs to have some
bug cleanup as the testsuite shows.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/atomic.h | 2 | ||||
-rw-r--r-- | runtime/rule.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/runtime/atomic.h b/runtime/atomic.h index e5fafe04..da0852fa 100644 --- a/runtime/atomic.h +++ b/runtime/atomic.h @@ -50,7 +50,7 @@ # define ATOMIC_STORE_0_TO_INT(data, phlpmut) __sync_fetch_and_and(data, 0) # define ATOMIC_STORE_1_TO_INT(data, phlpmut) __sync_fetch_and_or(data, 1) # define ATOMIC_STORE_INT_TO_INT(data, val) __sync_fetch_and_or(&(data), (val)) -# define ATOMIC_CAS(data, oldVal, newVal) __sync_bool_compare_and_swap(&(data), (oldVal), (newVal)); +# define ATOMIC_CAS(data, oldVal, newVal, phlpmut) __sync_bool_compare_and_swap(data, (oldVal), (newVal)) # define ATOMIC_CAS_VAL(data, oldVal, newVal, phlpmut) __sync_val_compare_and_swap(data, (oldVal), (newVal)); /* functions below are not needed if we have atomics */ diff --git a/runtime/rule.c b/runtime/rule.c index 65ad071e..7a26a03a 100644 --- a/runtime/rule.c +++ b/runtime/rule.c @@ -110,7 +110,7 @@ DEFFUNC_llExecFunc(processMsgDoActions) ABORT_FINALIZE(RS_RET_OK); } - iRetMod = actionCallAction(pAction, pDoActData->pMsg); + iRetMod = pAction->submitToActQ(pAction, pDoActData->pMsg); if(iRetMod == RS_RET_DISCARDMSG) { ABORT_FINALIZE(RS_RET_DISCARDMSG); } else if(iRetMod == RS_RET_SUSPENDED) { |