diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-04-22 15:06:45 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-04-22 15:06:45 +0200 |
commit | 7667845bd72b6f92eabc975318a4f288a77f2630 (patch) | |
tree | 54b839ee7b3ae5347145bf4c721600ce5ca411b5 /runtime/wtp.c | |
parent | b0cfe39c851de0851d88e1b6a51bf40a76fb8304 (diff) | |
download | rsyslog-7667845bd72b6f92eabc975318a4f288a77f2630.tar.gz rsyslog-7667845bd72b6f92eabc975318a4f288a77f2630.tar.xz rsyslog-7667845bd72b6f92eabc975318a4f288a77f2630.zip |
first attempt at dequeueing multiple batches inside the queue
... but this code has serious problems when terminating the queue, also
it is far from being optimal. I will commit a series of patches (hopefully)
as I am on the path to the final implementation.
Diffstat (limited to 'runtime/wtp.c')
-rw-r--r-- | runtime/wtp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/wtp.c b/runtime/wtp.c index 04eb974f..e1966099 100644 --- a/runtime/wtp.c +++ b/runtime/wtp.c @@ -88,6 +88,7 @@ BEGINobjConstruct(wtp) /* be sure to specify the object type also in END macro! pthread_cond_init(&pThis->condThrdTrm, NULL); /* set all function pointers to "not implemented" dummy so that we can safely call them */ pThis->pfChkStopWrkr = NotImplementedDummy; + pThis->pfGetDeqMaxAtOnce = NotImplementedDummy; pThis->pfIsIdle = NotImplementedDummy; pThis->pfDoWork = NotImplementedDummy; pThis->pfOnIdle = NotImplementedDummy; @@ -117,7 +118,7 @@ wtpConstructFinalize(wtp_t *pThis) */ if((pThis->pWrkr = malloc(sizeof(wti_t*) * pThis->iNumWorkerThreads)) == NULL) ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY); - + for(i = 0 ; i < pThis->iNumWorkerThreads ; ++i) { CHKiRet(wtiConstruct(&pThis->pWrkr[i])); pWti = pThis->pWrkr[i]; @@ -584,6 +585,7 @@ DEFpropSetMethPTR(wtp, pmutUsr, pthread_mutex_t) DEFpropSetMethPTR(wtp, pcondBusy, pthread_cond_t) DEFpropSetMethFP(wtp, pfChkStopWrkr, rsRetVal(*pVal)(void*, int)) DEFpropSetMethFP(wtp, pfRateLimiter, rsRetVal(*pVal)(void*)) +DEFpropSetMethFP(wtp, pfGetDeqMaxAtOnce, rsRetVal(*pVal)(void*, int*)) DEFpropSetMethFP(wtp, pfIsIdle, rsRetVal(*pVal)(void*, int)) DEFpropSetMethFP(wtp, pfDoWork, rsRetVal(*pVal)(void*, void*, int)) DEFpropSetMethFP(wtp, pfOnIdle, rsRetVal(*pVal)(void*, int)) |