summaryrefslogtreecommitdiff
path: root/runtime/wtp.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2011-02-07 18:00:17 +0100
committerMichael Biebl <biebl@debian.org>2011-02-07 18:00:17 +0100
commit537e74be114f1698f9ec825cf8ea497ffc0f17c5 (patch)
treef06036c66bfef013978bd8e53fb2a247e8a95842 /runtime/wtp.c
parent0a5a3fba01d42ef3b380c4ae27699bb42c3af493 (diff)
downloadrsyslog-537e74be114f1698f9ec825cf8ea497ffc0f17c5.tar.gz
Imported Upstream version 5.7.3upstream/5.7.3
Diffstat (limited to 'runtime/wtp.c')
-rw-r--r--runtime/wtp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/wtp.c b/runtime/wtp.c
index ece8091..e615fb1 100644
--- a/runtime/wtp.c
+++ b/runtime/wtp.c
@@ -90,6 +90,12 @@ BEGINobjConstruct(wtp) /* be sure to specify the object type also in END macro!
pthread_mutex_init(&pThis->mutWtp, NULL);
pthread_cond_init(&pThis->condThrdTrm, NULL);
pthread_attr_init(&pThis->attrThrd);
+ /* Set thread scheduling policy to default */
+#ifdef HAVE_PTHREAD_SETSCHEDPARAM
+ pthread_attr_setschedpolicy(&pThis->attrThrd, default_thr_sched_policy);
+ pthread_attr_setschedparam(&pThis->attrThrd, &default_sched_param);
+ pthread_attr_setinheritsched(&pThis->attrThrd, PTHREAD_EXPLICIT_SCHED);
+#endif
pthread_attr_setdetachstate(&pThis->attrThrd, PTHREAD_CREATE_DETACHED);
/* set all function pointers to "not implemented" dummy so that we can safely call them */
pThis->pfChkStopWrkr = NotImplementedDummy;