summaryrefslogtreecommitdiffstats
path: root/threads.c
diff options
context:
space:
mode:
authorDražen Kačar <dave@fly.srk.fer.hr>2011-01-10 12:39:23 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-01-10 12:39:23 +0100
commit7742b2182fc017ca4c9fcfe3b26f4c8d68a9bd58 (patch)
tree5105b0ff2a8ea76a0729d57111545e5858124daf /threads.c
parentc4026ec0f8d843540d01b07f94d4182d7dddb62e (diff)
downloadrsyslog-7742b2182fc017ca4c9fcfe3b26f4c8d68a9bd58.tar.gz
rsyslog-7742b2182fc017ca4c9fcfe3b26f4c8d68a9bd58.tar.xz
rsyslog-7742b2182fc017ca4c9fcfe3b26f4c8d68a9bd58.zip
improved imudp real-time scheduling support & bugfix
The original code had quite some issues, which are fixed by this commit. Also we do more error checking now. Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
Diffstat (limited to 'threads.c')
-rw-r--r--threads.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/threads.c b/threads.c
index 4064fc7a..f1f275bd 100644
--- a/threads.c
+++ b/threads.c
@@ -220,7 +220,13 @@ rsRetVal thrdCreate(rsRetVal (*thrdMain)(thrdInfo_t*), rsRetVal(*afterRun)(thrdI
pThis->pUsrThrdMain = thrdMain;
pThis->pAfterRun = afterRun;
pThis->bNeedsCancel = bNeedsCancel;
- i = pthread_create(&pThis->thrdID, NULL, thrdStarter, pThis);
+ i = pthread_create(&pThis->thrdID,
+#ifdef HAVE_PTHREAD_SETSCHEDPARAM
+ &default_thread_attr,
+#else
+ NULL,
+#endif
+ thrdStarter, pThis);
CHKiRet(llAppend(&llThrds, NULL, pThis));
finalize_it: