Lines Matching refs:Tskmgr
39 static taskmgr_T Tskmgr = {0};
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) \
169 if (Tskmgr.tm_signature != TM_SIGNATURE)
184 if (Tskmgr.tm_nb_idle > 0)
272 if (Tskmgr.tm_signature == TM_SIGNATURE)
276 Tskmgr.tm_tid = (sthread_t) -1;
277 Tskmgr.tm_nb_workers = 0;
278 Tskmgr.tm_nb_idle = 0;
280 if (pipe(Tskmgr.tm_p) != 0)
293 (void) smutex_init(&Tskmgr.tm_w_mutex);
294 (void) scond_init(&Tskmgr.tm_w_cond);
303 Tskmgr.tm_tid = tid;
304 Tskmgr.tm_signature = TM_SIGNATURE;
360 Tskmgr.tm_tid = sthread_get_id();
361 if (pthread_detach(Tskmgr.tm_tid) != 0)
584 if (Tskmgr.tm_nb_idle > 0)
609 Tskmgr.tm_signature = 0;
620 (void) smutex_destroy(&Tskmgr.tm_w_mutex);
621 (void) scond_destroy(&Tskmgr.tm_w_cond);
677 Tskmgr.tm_nb_workers++;
745 if (Tskmgr.tm_nb_workers > MIN_WORKERS &&
746 Tskmgr.tm_nb_idle > MIN_IDLE)
750 Tskmgr.tm_nb_workers, Tskmgr.tm_nb_idle + 1));
755 Tskmgr.tm_nb_workers--;
764 Tskmgr.tm_nb_idle++;
766 Tskmgr.tm_nb_idle--;