void __tt_schedule_yield (void *arg) { if(g_thread_current != NULL) { listMove (listGetPrev (&g_thread_current->list_schedule), &g_thread_current->list_schedule); //listSwapBefore (&g_thread_current->list_schedule); } __tt_schedule (); }
static void __tt_wq_schedule_timeout (void *arg) { __TIMEOUT_WQ_T *wq_args = (__TIMEOUT_WQ_T *)arg; wq_args->result = 0; //wq_args->result may be overwritten on timeout if (tt_timer_is_active (&wq_args->timer)) __tt_schedule (); else wq_args->result = -1; }
static void tt_schedule_remove (void *arg) { #ifdef TT_SUPPORT_DUMP_THREAD listDetach (&g_thread_current->list_threads); #endif // TT_SUPPORT_STACK_CHECK listDetach (&g_thread_current->list_schedule); g_thread_current->wait_parent = NULL; #ifdef TT_SUPPORT_MUTEX listDetach (&g_thread_current->list_wait_head); listDetach (&g_thread_current->list_wait_node); #endif // TT_SUPPORT_MUTEX __tt_schedule (); }
static void __tt_wq_wait_event (void *arg) { TT_WQ_T *wait_queue = (TT_WQ_T *)arg; __tt_wq_add_event (wait_queue); __tt_schedule (); }