コード例 #1
0
ファイル: thread.c プロジェクト: a781947241/GridOS
bool kt_init()
{
	cl_object_type_register(&thread_type);
	init_idle_thread(kc_get_raw(), &init_thread);
	
	return true;
}
コード例 #2
0
ファイル: tfm_thread.c プロジェクト: donatieng/mbed
/* Scheduling won't happen immediately but after the exception returns */
void tfm_thrd_activate_schedule(void)
{
    /*
     * The current thread can be NULL only when initializing. Create the IDLE
     * thread and set it as the current thread to collect caller context.
     */
    if (CURR_THRD == NULL) {
        CURR_THRD = init_idle_thread(&idle_thread);
    }

    tfm_trigger_pendsv();
}