Lines Matching refs:Tskmgr
39 static taskmgr_T Tskmgr = {0}; variable
41 #define WRK_CTX_HEAD Tskmgr.tm_ctx_head
43 #define RD_PIPE (Tskmgr.tm_p[0])
44 #define WR_PIPE (Tskmgr.tm_p[1])
110 if (!smutex_lock(&Tskmgr.tm_w_mutex)) \
117 if (!smutex_unlock(&Tskmgr.tm_w_mutex)) \
122 scond_timedwait(&Tskmgr.tm_w_cond, &Tskmgr.tm_w_mutex, COND_TIMEOUT)
127 if (scond_signal(&Tskmgr.tm_w_cond) != 0) \
168 SM_ASSERT(Tskmgr.tm_signature == TM_SIGNATURE);
182 if (Tskmgr.tm_nb_idle > 0)
235 if (Tskmgr.tm_signature == TM_SIGNATURE) in mi_pool_controller_init()
239 Tskmgr.tm_tid = (sthread_t) -1; in mi_pool_controller_init()
240 Tskmgr.tm_nb_workers = 0; in mi_pool_controller_init()
241 Tskmgr.tm_nb_idle = 0; in mi_pool_controller_init()
243 if (pipe(Tskmgr.tm_p) != 0) in mi_pool_controller_init()
250 (void) smutex_init(&Tskmgr.tm_w_mutex); in mi_pool_controller_init()
251 (void) scond_init(&Tskmgr.tm_w_cond); in mi_pool_controller_init()
260 Tskmgr.tm_tid = tid; in mi_pool_controller_init()
261 Tskmgr.tm_signature = TM_SIGNATURE; in mi_pool_controller_init()
317 Tskmgr.tm_tid = sthread_get_id();
318 if (pthread_detach(Tskmgr.tm_tid) != 0)
543 if (Tskmgr.tm_nb_idle > 0)
568 Tskmgr.tm_signature = 0;
579 (void) smutex_destroy(&Tskmgr.tm_w_mutex);
580 (void) scond_destroy(&Tskmgr.tm_w_cond);
636 Tskmgr.tm_nb_workers++;
704 if (Tskmgr.tm_nb_workers > MIN_WORKERS &&
705 Tskmgr.tm_nb_idle > MIN_IDLE)
709 Tskmgr.tm_nb_workers, Tskmgr.tm_nb_idle + 1));
714 Tskmgr.tm_nb_workers--;
723 Tskmgr.tm_nb_idle++;
725 Tskmgr.tm_nb_idle--;