summaryrefslogtreecommitdiffstats
path: root/action.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-06-08 15:20:33 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-06-08 15:20:33 +0200
commit11bd517465360278b270ee7c18607b4d1d97e44e (patch)
tree429d9fda28dd132c8b592738d955cd34a56e823e /action.h
parent3e49a1075ab6750135e1a38cf0c213579fa30b4a (diff)
downloadrsyslog-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 'action.h')
-rw-r--r--action.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/action.h b/action.h
index 43e6ae7d..bf9ceafa 100644
--- a/action.h
+++ b/action.h
@@ -47,6 +47,7 @@ typedef enum {
/* the following struct defines the action object data structure
*/
+typedef struct action_s action_t;
struct action_s {
time_t f_time; /* used for "message repeated n times" - be careful, old, old code */
time_t tActNow; /* the current time for an action execution. Initially set to -1 and
@@ -69,10 +70,11 @@ struct action_s {
struct modInfo_s *pMod;/* pointer to output module handling this selector */
void *pModData; /* pointer to module data - content is module-specific */
sbool bRepMsgHasMsg; /* "message repeated..." has msg fragment in it (0-no, 1-yes) */
- sbool bSubmitFirehoseMode;/* fast submission to action q in phase 1 possible? */
short f_ReduceRepeated;/* reduce repeated lines 0 - no, 1 - yes */
int f_prevcount; /* repetition cnt of prevline */
int f_repeatcount; /* number of "repeated" msgs */
+ rsRetVal (*submitToActQ)(action_t *, msg_t *); /* function submit message to action queue */
+ rsRetVal (*qConstruct)(struct queue_s *pThis);
enum { ACT_STRING_PASSING = 0, ACT_ARRAY_PASSING = 1, ACT_MSG_PASSING }
eParamPassing; /* mode of parameter passing to action */
int iNumTpls; /* number of array entries for template element below */
@@ -90,7 +92,6 @@ struct action_s {
void *ppMsgs; /* pointer to action-calling parameters (kept in structure to save alloc() time!) */
size_t *lenMsgs; /* length of message in ppMsgs */
};
-typedef struct action_s action_t;
/* function prototypes
@@ -101,7 +102,6 @@ rsRetVal actionDestruct(action_t *pThis);
rsRetVal actionDbgPrint(action_t *pThis);
rsRetVal actionSetGlobalResumeInterval(int iNewVal);
rsRetVal actionDoAction(action_t *pAction);
-rsRetVal actionCallAction(action_t *pAction, msg_t *pMsg);
rsRetVal actionWriteToAction(action_t *pAction);
rsRetVal actionCallHUPHdlr(action_t *pAction);
rsRetVal actionClassInit(void);