summaryrefslogtreecommitdiffstats
path: root/runtime/wtp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-05-20 11:11:02 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-05-20 11:11:02 +0200
commitad7ccabe5ec616a4bf9fda1472d8041eaf1bf815 (patch)
treeaa6aeba40e7fac4361306dee57bded3da7ab757d /runtime/wtp.c
parent0cf8e88a348dc574244e4f5c2be26f47e8bfff08 (diff)
downloadrsyslog-ad7ccabe5ec616a4bf9fda1472d8041eaf1bf815.tar.gz
rsyslog-ad7ccabe5ec616a4bf9fda1472d8041eaf1bf815.tar.xz
rsyslog-ad7ccabe5ec616a4bf9fda1472d8041eaf1bf815.zip
yield() no longer needed on uniproc thanks to new algorithms
Diffstat (limited to 'runtime/wtp.c')
-rw-r--r--runtime/wtp.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/runtime/wtp.c b/runtime/wtp.c
index 9891a55c..dab59562 100644
--- a/runtime/wtp.c
+++ b/runtime/wtp.c
@@ -40,10 +40,10 @@
#include <unistd.h>
#include <errno.h>
-#ifdef OS_SOLARIS
-# include <sched.h>
-# define pthread_yield() sched_yield()
-#endif
+/// TODO: check on solaris if this is any longer needed - I don't think so - rgerhards, 2009-09-20
+//#ifdef OS_SOLARIS
+//# include <sched.h>
+//#endif
#include "rsyslog.h"
#include "stringbuf.h"
@@ -510,14 +510,6 @@ wtpStartWrkr(wtp_t *pThis, int bLockMutex)
dbgprintf("%s: started with state %d, num workers now %d\n",
wtpGetDbgHdr(pThis), iState, pThis->iCurNumWrkThrd);
- /* we try to give the starting worker a little boost. It won't help much as we still
- * hold the queue's mutex, but at least it has a chance to start on a single-CPU system.
- */
-# if !defined(__hpux) /* pthread_yield is missing there! */
- if(pThis->bOptimizeUniProc)
- pthread_yield();
-# endif
-
/* indicate we just started a worker and would like to see it running */
wtpSetInactivityGuard(pThis, 1, MUTEX_ALREADY_LOCKED);