summaryrefslogtreecommitdiffstats
path: root/queue.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-01-15 11:04:46 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-01-15 11:04:46 +0000
commit8f5c0764aaafc9eab72d20761ecba6a27d321f89 (patch)
tree5ce4356474a84b37598813398350b7b588ed6894 /queue.h
parent75b645f16b930f142b777b00b529fb726ef10243 (diff)
downloadrsyslog-8f5c0764aaafc9eab72d20761ecba6a27d321f89.tar.gz
rsyslog-8f5c0764aaafc9eab72d20761ecba6a27d321f89.tar.xz
rsyslog-8f5c0764aaafc9eab72d20761ecba6a27d321f89.zip
disk assisted queue works quite well, except for startup from disk queue
Diffstat (limited to 'queue.h')
-rw-r--r--queue.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/queue.h b/queue.h
index 51e2aa0d..e29cf7da 100644
--- a/queue.h
+++ b/queue.h
@@ -66,7 +66,8 @@ typedef enum {
/* ALL active states MUST be numerically higher than eWRKTHRDCMD_TERMINATED and NONE must be lower! */
eWRKTHRDCMD_RUN = 2,
eWRKTHRDCMD_SHUTDOWN = 3,
- eWRKTHRDCMD_SHUTDOWN_IMMEDIATE = 4
+ eWRKTHRDCMD_SHUTDOWN_IMMEDIATE = 4,
+ eWRKTHRDCMD_TURN_OFF_DA_MODE = 5
} qWrkCmd_t; /* commands for queue worker threads */
typedef struct qWrkThrd_s {
@@ -86,6 +87,7 @@ typedef struct queue_s {
int iUpdsSincePersist;/* nbr of queue updates since the last persist call */
int iPersistUpdCnt; /* persits queue info after this nbr of updates - 0 -> persist only on shutdown */
int iHighWtrMrk; /* high water mark for disk-assisted memory queues */
+ int bWasBelowHighWtr;/* when running in DA mode: queue was below high wtr mrk at least once */
int iLowWtrMrk; /* low water mark for disk-assisted memory queues */
int iDiscardMrk; /* if the queue is above this mark, low-severity messages are discarded */
int iDiscardSeverity;/* messages of this severity above are discarded on too-full queue */
@@ -107,6 +109,7 @@ typedef struct queue_s {
pthread_cond_t *condSignalOnEmpty;/* caller-provided condition to be signalled when queue is empty (DA mode!) */
pthread_mutex_t *mutSignalOnEmpty; /* and its associated mutex */
int bSignalOnEmpty; /* signal caller when queue is empty via xxxSignalOnEmpty cond/mut */
+ int bThrdStateChanged; /* at least one thread state has changed if 1 */
/* end sync variables */
/* the following variables are always present, because they
* are not only used for the "disk" queueing mode but also for