mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-09 21:14:02 +00:00
fix thread priority code, this has never worked until today
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
Mon Sep 27 13:15:54 CDT 2010
|
||||
Thu Sep 27 13:36:14 CDT 2012
|
||||
|
||||
@@ -60,6 +60,7 @@ struct apr_thread_t {
|
||||
struct apr_threadattr_t {
|
||||
apr_pool_t *pool;
|
||||
pthread_attr_t attr;
|
||||
int priority;
|
||||
};
|
||||
|
||||
struct apr_threadkey_t {
|
||||
|
||||
@@ -174,6 +174,11 @@ APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new,
|
||||
}
|
||||
|
||||
if ((stat = pthread_create((*new)->td, temp, dummy_worker, (*new))) == 0) {
|
||||
if (attr->priority) {
|
||||
pthread_t *thread = (*new)->td;
|
||||
pthread_setschedprio(*thread, attr->priority);
|
||||
}
|
||||
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user