summaryrefslogtreecommitdiff
path: root/threading_pthread.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-05 17:23:43 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-05 17:23:43 +0200
commitfea077efa41959daee6e091a9029293210eaf9d1 (patch)
tree3c30defd99532074965d83974d53fdafeb649954 /threading_pthread.c
parentb53e7fc73342b76fac27cb7197e4ee6f3d3fa0d0 (diff)
restrict pthread_setschedprio to linux
Diffstat (limited to 'threading_pthread.c')
-rw-r--r--threading_pthread.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/threading_pthread.c b/threading_pthread.c
index 4f7cba1a..e6b9df9c 100644
--- a/threading_pthread.c
+++ b/threading_pthread.c
@@ -48,6 +48,7 @@ thread_start (void (*fn)(void *ctx), void *ctx) {
intptr_t
thread_start_low_priority (void (*fn)(void *ctx), void *ctx) {
+#ifdef __linux__
pthread_t tid;
pthread_attr_t attr;
int s = pthread_attr_init (&attr);
@@ -82,6 +83,9 @@ thread_start_low_priority (void (*fn)(void *ctx), void *ctx) {
return 0;
}
return tid;
+#else
+ return thread_start (fn, ctx);
+#endif
}
int