summaryrefslogtreecommitdiffstats
path: root/runtime/queue.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-10-02 11:01:18 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-10-02 11:01:18 +0200
commit732761063db3d7521334cb7d72736e913e735e71 (patch)
tree27a25cf46a03d15ceb084cc1e3727aac15425d87 /runtime/queue.c
parent1531c541b294b6c029e5de9a01d4d8499f7e4718 (diff)
parent1908bae50491624d270c73609ea45634c15246fd (diff)
downloadrsyslog-732761063db3d7521334cb7d72736e913e735e71.tar.gz
rsyslog-732761063db3d7521334cb7d72736e913e735e71.tar.bz2
rsyslog-732761063db3d7521334cb7d72736e913e735e71.zip
Merge branch 'helgrind' into perf
Diffstat (limited to 'runtime/queue.c')
-rw-r--r--runtime/queue.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/queue.c b/runtime/queue.c
index 3fae4aa7..76c2f10f 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -1430,8 +1430,13 @@ queueDequeueConsumable(queue_t *pThis, wti_t *pWti, int iCancelStateSave)
pthread_cond_broadcast(&pThis->belowLightDlyWtrMrk);
}
- d_pthread_mutex_unlock(pThis->mut);
+ /* rgerhards, 2008-09-30: I reversed the order of cond_signal und mutex_unlock
+ * as of the pthreads recommendation on predictable scheduling behaviour. I don't see
+ * any problems caused by this, but I add this comment in case some will be seen
+ * in the next time.
+ */
pthread_cond_signal(&pThis->notFull);
+ d_pthread_mutex_unlock(pThis->mut);
pthread_setcancelstate(iCancelStateSave, NULL);
/* WE ARE NO LONGER PROTECTED BY THE MUTEX */