diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-24 17:55:09 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-24 17:55:09 +0000 |
commit | 5c686c8adcc473cbdbb14e4b2d736f9123210ee6 (patch) | |
tree | eb83fbca0d98ac4948b6d9ca22d8a0e4828815a9 /wti.h | |
parent | 76782c240db52c81825c907c40c31ca8b48218de (diff) | |
download | rsyslog-5c686c8adcc473cbdbb14e4b2d736f9123210ee6.tar.gz rsyslog-5c686c8adcc473cbdbb14e4b2d736f9123210ee6.tar.xz rsyslog-5c686c8adcc473cbdbb14e4b2d736f9123210ee6.zip |
redesigned queue to utilize helper classes for threading support. This is
finally in a running state for regular (non disk-assisted) queues, with
a minor nit at shutdown. So I can finally commit the work again to
CVS...
Diffstat (limited to 'wti.h')
-rw-r--r-- | wti.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -32,7 +32,7 @@ typedef struct wti_s { BEGINobjInstance; pthread_t thrdID; /* thread ID */ qWrkCmd_t tCurrCmd; /* current command to be carried out by worker */ - obj_t *pUsr; /* current user object being processed (or NULL if none) */ + obj_t *pUsrp; /* pointer to an object meaningful for current user pointer (e.g. queue pUsr data elemt) */ wtp_t *pWtp; /* my worker thread pool (important if only the work thread instance is passed! */ pthread_cond_t condInitDone; /* signaled when the thread startup is done (once per thread existance) */ pthread_mutex_t mut; @@ -47,8 +47,13 @@ rsRetVal wtiConstruct(wti_t **ppThis); rsRetVal wtiConstructFinalize(wti_t *pThis); rsRetVal wtiDestruct(wti_t **ppThis); rsRetVal wtiWorker(wti_t *pThis); +rsRetVal wtiProcessThrdChanges(wti_t *pThis, int bLockMutex); +rsRetVal wtiSetDbgHdr(wti_t *pThis, uchar *pszMsg, size_t lenMsg); +rsRetVal wtiSetState(wti_t *pThis, qWrkCmd_t tCmd, int bActiveOnly, int bLockMutex); +rsRetVal wtiJoinThrd(wti_t *pThis); +qWrkCmd_t wtiGetState(wti_t *pThis, int bLockMutex); PROTOTYPEObjClassInit(wti); PROTOTYPEpropSetMeth(wti, pszDbgHdr, uchar*); -#define wtiGetID(pThis) ((unsigned long) pThis) +PROTOTYPEpropSetMeth(wti, pWtp, wtp_t*); #endif /* #ifndef WTI_H_INCLUDED */ |