pthread_mutex_lock(arg.mutex);
if (pthread_create(&tid, &attr, su_pthread_port_clone_main, &arg) == 0) {
+#ifndef WIN32
+ /* this needs to be revisited when pthread for windows supports thread priority settings */
pthread_setschedprio(tid, 99);
+#endif
pthread_cond_wait(arg.cv, arg.mutex);
thread_created = 1;
}
pthread_attr_t attr;
int priority;
};
+#else
+/* this needs to be revisited when apr for windows supports thread priority settings */
+/* search for WIN32 in this file */
+struct apr_threadattr_t {
+ apr_pool_t *pool;
+ apr_int32_t detach;
+ apr_size_t stacksize;
+};
#endif
switch_status_t status;
if ((status = apr_threadattr_create(new_attr, pool)) == SWITCH_STATUS_SUCCESS) {
+#ifndef WIN32
(*new_attr)->priority = SWITCH_PRI_NORMAL;
+#endif
}
return status;