summaryrefslogtreecommitdiff
path: root/threads.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 /threads.c
parent0a5a3fba01d42ef3b380c4ae27699bb42c3af493 (diff)
downloadrsyslog-537e74be114f1698f9ec825cf8ea497ffc0f17c5.tar.gz
Imported Upstream version 5.7.3upstream/5.7.3
Diffstat (limited to 'threads.c')
-rw-r--r--threads.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/threads.c b/threads.c
index 4064fc7..d4e1452 100644
--- a/threads.c
+++ b/threads.c
@@ -211,7 +211,6 @@ rsRetVal thrdCreate(rsRetVal (*thrdMain)(thrdInfo_t*), rsRetVal(*afterRun)(thrdI
{
DEFiRet;
thrdInfo_t *pThis;
- int i;
assert(thrdMain != NULL);
@@ -220,7 +219,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);
+ pthread_create(&pThis->thrdID,
+#ifdef HAVE_PTHREAD_SETSCHEDPARAM
+ &default_thread_attr,
+#else
+ NULL,
+#endif
+ thrdStarter, pThis);
CHKiRet(llAppend(&llThrds, NULL, pThis));
finalize_it: