12 lines
519 B
Plaintext
12 lines
519 B
Plaintext
--- src/Unix/main_unix.cpp.orig Tue May 15 22:25:15 2012
|
|
+++ src/Unix/main_unix.cpp Tue May 15 22:26:08 2012
|
|
@@ -981,7 +981,7 @@ static void sigint_handler(...)
|
|
void Set_pthread_attr(pthread_attr_t *attr, int priority)
|
|
{
|
|
pthread_attr_init(attr);
|
|
-#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
|
|
+#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING > 0)
|
|
// Some of these only work for superuser
|
|
if (geteuid() == 0) {
|
|
pthread_attr_setinheritsched(attr, PTHREAD_EXPLICIT_SCHED);
|