diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-03 14:57:23 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-03 14:57:23 +0000 |
commit | f7a15abfba79a9da1f125d48e75b3bb68ebe0e9e (patch) | |
tree | db901e43604c22cc5367c02d1a88acdd82e02193 /queue.h | |
parent | fc761b9fdc5486a0072ee63d8b438f562127d057 (diff) | |
download | rsyslog-f7a15abfba79a9da1f125d48e75b3bb68ebe0e9e.tar.gz rsyslog-f7a15abfba79a9da1f125d48e75b3bb68ebe0e9e.tar.bz2 rsyslog-f7a15abfba79a9da1f125d48e75b3bb68ebe0e9e.zip |
added capability to use a linked list for queuing to the queue class
Diffstat (limited to 'queue.h')
-rw-r--r-- | queue.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -31,9 +31,16 @@ typedef enum { QUEUETYPE_LINKEDLIST,/* linked list used as buffer, lower fixed memory overhead but slower */ } queueType_t; +/* list member definition for linked list types of queues: */ +typedef struct qLinkedList_S { + struct qLinkedList_S *pNext; + void *pUsr; +} qLinkedList_t; + /* the queue object */ typedef struct queue_s { queueType_t qType; + int iQueueSize; /* Current number of elements in the queue */ int iMaxQueueSize; /* how large can the queue grow? */ pthread_t thrdWorker; /* ID of the worker thread associated with this queue */ int bDoRun; /* 1 - run queue, 0 - shutdown of queue requested */ @@ -54,6 +61,10 @@ typedef struct queue_s { long head, tail; void** pBuf; /* the queued user data structure */ } farray; + struct { + qLinkedList_t *pRoot; + qLinkedList_t *pLast; + } linklist; } tVars; } queue_t; |