summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-10-09 11:21:24 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-10-09 11:21:24 +0200
commitaf3c944563b8651c14b2b9087ea76f7eeacfc065 (patch)
tree5bab51041039f97855aa4d08e9f780c3eb8d1c9c
parent634cfdbe8ec7182b7fb74b184d269697e5fcab6c (diff)
downloadrsyslog-af3c944563b8651c14b2b9087ea76f7eeacfc065.tar.gz
rsyslog-af3c944563b8651c14b2b9087ea76f7eeacfc065.tar.xz
rsyslog-af3c944563b8651c14b2b9087ea76f7eeacfc065.zip
added experimental pthread_yield()
which so far seems to increase performance. There is also reason for it to do so, see http://kb.monitorware.com/post14216.html#p14216
-rw-r--r--runtime/queue.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/queue.c b/runtime/queue.c
index 25c0bd5f..3ef6d5a0 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -2185,6 +2185,11 @@ finalize_it:
/* and release the mutex */
d_pthread_mutex_unlock(pThis->mut);
pthread_setcancelstate(iCancelStateSave, NULL);
+ /* the following pthread_yield is experimental, but brought us performance
+ * benefit. For details, please see http://kb.monitorware.com/post14216.html#p14216
+ * rgerhards, 2008-10-09
+ */
+ pthread_yield();
}
RETiRet;