From f48128f34a17aae7e7b9405fe32b396db45443ca Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 23 Jun 2010 12:48:27 +0200 Subject: fixed a couple of regressions by implementing some code that was missing so far ;) as well as finding some real bugs. I also did some general cleanup, removing debug strings and such. This code should be fairly OK to use, except when "exec only when previous action was suspended" is used -- this is NOT yet re-implemented in the tuned engine. --- runtime/stream.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'runtime/stream.c') diff --git a/runtime/stream.c b/runtime/stream.c index e0b97f9f..b4295762 100644 --- a/runtime/stream.c +++ b/runtime/stream.c @@ -937,7 +937,6 @@ asyncWriterThread(void *pPtr) while(1) { /* loop broken inside */ d_pthread_mutex_lock(&pThis->mut); -dbgprintf("XXX: asyncWriterThread iterating %s\n", pThis->pszFName); while(pThis->iCnt == 0) { if(pThis->bStopWriter) { pthread_cond_broadcast(&pThis->isEmpty); @@ -953,7 +952,6 @@ dbgprintf("XXX: asyncWriterThread iterating %s\n", pThis->pszFName); bTimedOut = 0; timeoutComp(&t, pThis->iFlushInterval * 2000); /* *1000 millisconds */ // TODO: check the 2000?!? if(pThis->bDoTimedWait) { -dbgprintf("asyncWriter thread going to timeout sleep\n"); if(pthread_cond_timedwait(&pThis->notEmpty, &pThis->mut, &t) != 0) { int err = errno; if(err == ETIMEDOUT) { @@ -967,16 +965,13 @@ dbgprintf("asyncWriter thread going to timeout sleep\n"); } } } else { -dbgprintf("asyncWriter thread going to eternal sleep\n"); d_pthread_cond_wait(&pThis->notEmpty, &pThis->mut); } -dbgprintf("asyncWriter woke up\n"); } bTimedOut = 0; /* we may have timed out, but there *is* work to do... */ iDeq = pThis->iDeq++ % STREAM_ASYNC_NUMBUFS; -dbgprintf("asyncWriter writes data\n"); doWriteInternal(pThis, pThis->asyncBuf[iDeq].pBuf, pThis->asyncBuf[iDeq].lenBuf); // TODO: error check????? 2009-07-06 -- cgit