FS-4695 fix apple build, seems there's no pthread_setschedprio on Mac, not sure if windows has the same problem in apr/threadproc/unix/thread.c

This commit is contained in:
Seven Du
2012-10-08 09:03:34 +08:00
parent da0ff2d615
commit 0263ce9247
2 changed files with 8 additions and 2 deletions
+2
View File
@@ -174,10 +174,12 @@ APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new,
}
if ((stat = pthread_create((*new)->td, temp, dummy_worker, (*new))) == 0) {
#ifndef __APPLE__
if (attr->priority) {
pthread_t *thread = (*new)->td;
pthread_setschedprio(*thread, attr->priority);
}
#endif
return APR_SUCCESS;
}