void *dim_dtq_thread(void *tag) { extern int dim_dtq_init(); extern int dtq_task(); /* int prio; thr_getprio(thr_self(),&prio); thr_setprio(thr_self(),prio+5); */ if(tag){} ALRM_thread = pthread_self(); dim_dtq_init(1); if(INIT_thread) { #ifndef darwin sem_post(&DIM_INIT_Sema); #else sem_post(DIM_INIT_Semap); #endif } while(1) { dtq_task(); /* #ifndef darwin sem_post(&DIM_WAIT_Sema); #else sem_post(DIM_WAIT_Semap); #endif */ dim_signal_cond(); } }
void *dim_dtq_thread(void *tag) { sigset_t set1,set2; int signo, ret; /* int prio; thr_getprio(thr_self(),&prio); thr_setprio(thr_self(),prio+5); */ ALRM_thread = pthread_self(); dim_dtq_init(1); while(1) { if(INIT_thread) { #ifndef darwin sem_post(&DIM_INIT_Sema); #else sem_post(DIM_INIT_Semap); #endif } dtq_task(); #ifndef darwin sem_post(&DIM_WAIT_Sema); #else sem_post(DIM_WAIT_Semap); #endif } }