diff --git a/src/core/rthreads.h b/src/core/rthreads.h index 1a04f9982c7..56d68cef276 100644 --- a/src/core/rthreads.h +++ b/src/core/rthreads.h @@ -40,7 +40,7 @@ static void *run_threadP(_thread_proto fn, void *arg) pthread_t tid; void *ret = NULL; - if(likely(ksr_tls_threads_mode == 0 + if(likely(ksr_tls_threads_mode == 0 || ksr_tls_threads_mode == 2 || (ksr_tls_threads_mode == 1 && process_no > 0))) { return fn(arg); } @@ -77,7 +77,7 @@ static void *run_threadPI(_thread_protoPI fn, void *arg1, int arg2) pthread_t tid; void *ret = NULL; - if(likely(ksr_tls_threads_mode == 0 + if(likely(ksr_tls_threads_mode == 0 || ksr_tls_threads_mode == 2 || (ksr_tls_threads_mode == 1 && process_no > 0))) { return fn(arg1, arg2); } @@ -113,7 +113,7 @@ static void run_threadV(_thread_protoV fn) #ifdef USE_TLS pthread_t tid; - if(likely(ksr_tls_threads_mode == 0 + if(likely(ksr_tls_threads_mode == 0 || ksr_tls_threads_mode == 2 || (ksr_tls_threads_mode == 1 && process_no > 0))) { fn(); return; @@ -152,7 +152,7 @@ static int run_thread4PP(_thread_proto4PP fn, void *arg1, void *arg2) pthread_t tid; int ret = 0; - if(likely(ksr_tls_threads_mode == 0 + if(likely(ksr_tls_threads_mode == 0 || ksr_tls_threads_mode == 2 || (ksr_tls_threads_mode == 1 && process_no > 0))) { return fn(arg1, arg2); } @@ -188,7 +188,7 @@ static void run_thread0P(_thread_proto0P fn, void *arg1) #ifdef USE_TLS pthread_t tid; - if(likely(ksr_tls_threads_mode == 0 + if(likely(ksr_tls_threads_mode == 0 || ksr_tls_threads_mode == 2 || (ksr_tls_threads_mode == 1 && process_no > 0))) { fn(arg1); return; @@ -240,7 +240,7 @@ static int run_thread4P5I2P2(_thread_proto4P5I2P2 fn, void *arg1, void *arg2, pthread_t tid; int ret = 0; - if(likely(ksr_tls_threads_mode == 0 + if(likely(ksr_tls_threads_mode == 0 || ksr_tls_threads_mode == 2 || (ksr_tls_threads_mode == 1 && process_no > 0))) { return fn(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); } @@ -278,7 +278,7 @@ static int run_thread4L(_thread_proto4L fn, long arg1) pthread_t tid; int ret = 0; - if(likely(ksr_tls_threads_mode == 0 + if(likely(ksr_tls_threads_mode == 0 || ksr_tls_threads_mode == 2 || (ksr_tls_threads_mode == 1 && process_no > 0))) { return fn(arg1); }