Lines Matching refs:l
216 struct thread_core_local *l = get_core_local(pos); in get_stackcheck_recursion_flag() local
217 int ct = l->curr_thread; in get_stackcheck_recursion_flag()
220 if (l->flags & (THREAD_CLF_ABORT | THREAD_CLF_TMP)) in get_stackcheck_recursion_flag()
221 p = &l->stackcheck_recursion; in get_stackcheck_recursion_flag()
222 else if (!l->flags) in get_stackcheck_recursion_flag()
256 struct thread_core_local *l = thread_get_core_local(); in thread_init_boot_thread() local
260 l->curr_thread = 0; in thread_init_boot_thread()
266 struct thread_core_local *l = thread_get_core_local(); in thread_clr_boot_thread() local
268 assert(l->curr_thread >= 0 && l->curr_thread < CFG_NUM_THREADS); in thread_clr_boot_thread()
269 assert(threads[l->curr_thread].state == THREAD_STATE_ACTIVE); in thread_clr_boot_thread()
270 threads[l->curr_thread].state = THREAD_STATE_FREE; in thread_clr_boot_thread()
271 l->curr_thread = THREAD_ID_INVALID; in thread_clr_boot_thread()
276 struct thread_core_local *l = thread_get_core_local(); in thread_get_tmp_sp() local
282 l->flags |= THREAD_CLF_TMP; in thread_get_tmp_sp()
284 return (void *)l->tmp_stack_va_end; in thread_get_tmp_sp()
308 struct thread_core_local *l = get_core_local(pos); in get_stack_limits() local
309 int ct = l->curr_thread; in get_stack_limits()
312 if (l->flags & THREAD_CLF_TMP) { in get_stack_limits()
319 } else if (l->flags & THREAD_CLF_ABORT) { in get_stack_limits()
326 } else if (!l->flags) { in get_stack_limits()
343 struct thread_core_local *l = thread_get_core_local(); in thread_is_from_abort_mode() local
345 return (l->flags >> THREAD_CLF_SAVED_SHIFT) & THREAD_CLF_ABORT; in thread_is_from_abort_mode()
355 struct thread_core_local *l = thread_get_core_local(); in thread_is_in_normal_mode() local
362 ret = (l->curr_thread != THREAD_ID_INVALID) && in thread_is_in_normal_mode()
363 !(l->flags & ~THREAD_CLF_TMP); in thread_is_in_normal_mode()
375 struct thread_core_local *l = thread_get_core_local(); in thread_get_id_may_fail() local
376 short int ct = l->curr_thread; in thread_get_id_may_fail()
509 struct thread_core_local *l = thread_get_core_local(); in thread_get_ctx_regs() local
511 assert(l->curr_thread != THREAD_ID_INVALID); in thread_get_ctx_regs()
512 return &threads[l->curr_thread].regs; in thread_get_ctx_regs()
519 struct thread_core_local *l; in thread_set_foreign_intr() local
521 l = thread_get_core_local(); in thread_set_foreign_intr()
523 assert(l->curr_thread != THREAD_ID_INVALID); in thread_set_foreign_intr()
526 threads[l->curr_thread].flags |= in thread_set_foreign_intr()
534 threads[l->curr_thread].flags &= in thread_set_foreign_intr()
543 struct thread_core_local *l; in thread_restore_foreign_intr() local
545 l = thread_get_core_local(); in thread_restore_foreign_intr()
547 assert(l->curr_thread != THREAD_ID_INVALID); in thread_restore_foreign_intr()
549 if (threads[l->curr_thread].flags & THREAD_FLAGS_FOREIGN_INTR_ENABLE) in thread_restore_foreign_intr()