Lines Matching refs:l
102 size_t l = stack_size_to_alloc_size(stack_size); in stack_end_va_to_top_hard() local
104 return end_va - l + STACK_CANARY_SIZE; in stack_end_va_to_top_hard()
334 struct thread_core_local *l = get_core_local(pos); in get_stackcheck_recursion_flag() local
335 int ct = l->curr_thread; in get_stackcheck_recursion_flag()
338 if (l->flags & (THREAD_CLF_ABORT | THREAD_CLF_TMP)) in get_stackcheck_recursion_flag()
339 p = &l->stackcheck_recursion; in get_stackcheck_recursion_flag()
340 else if (!l->flags) in get_stackcheck_recursion_flag()
374 struct thread_core_local *l = thread_get_core_local(); in thread_init_boot_thread() local
376 l->curr_thread = 0; in thread_init_boot_thread()
382 struct thread_core_local *l = thread_get_core_local(); in thread_clr_boot_thread() local
384 assert(l->curr_thread >= 0 && l->curr_thread < CFG_NUM_THREADS); in thread_clr_boot_thread()
385 assert(threads[l->curr_thread].state == THREAD_STATE_ACTIVE); in thread_clr_boot_thread()
386 threads[l->curr_thread].state = THREAD_STATE_FREE; in thread_clr_boot_thread()
387 l->curr_thread = THREAD_ID_INVALID; in thread_clr_boot_thread()
393 struct thread_core_local *l = thread_get_core_local(); in thread_get_tmp_sp() local
399 l->flags |= THREAD_CLF_TMP; in thread_get_tmp_sp()
401 return (void *)l->tmp_stack_va_end; in thread_get_tmp_sp()
425 struct thread_core_local *l = get_core_local(pos); in get_stack_limits() local
426 int ct = l->curr_thread; in get_stack_limits()
431 if (l->flags & THREAD_CLF_TMP) { in get_stack_limits()
432 va = l->tmp_stack_va_end + STACK_TMP_OFFS; in get_stack_limits()
434 } else if (l->flags & THREAD_CLF_ABORT) { in get_stack_limits()
435 va = l->abt_stack_va_end; in get_stack_limits()
437 } else if (!l->flags && ct >= 0 && (size_t)ct < thread_count) { in get_stack_limits()
457 struct thread_core_local *l = thread_get_core_local(); in thread_is_from_abort_mode() local
459 return (l->flags >> THREAD_CLF_SAVED_SHIFT) & THREAD_CLF_ABORT; in thread_is_from_abort_mode()
469 struct thread_core_local *l = thread_get_core_local(); in thread_is_in_normal_mode() local
476 ret = (l->curr_thread != THREAD_ID_INVALID) && in thread_is_in_normal_mode()
477 !(l->flags & ~THREAD_CLF_TMP); in thread_is_in_normal_mode()
489 struct thread_core_local *l = thread_get_core_local(); in thread_get_id_may_fail() local
490 short int ct = l->curr_thread; in thread_get_id_may_fail()
508 size_t l = stack_size_to_alloc_size(stack_size); in alloc_stack() local
509 size_t rl = ROUNDUP(l, SMALL_PAGE_SIZE); in alloc_stack()
520 end_va = va + l - STACK_CANARY_SIZE / 2; in alloc_stack()
697 struct thread_core_local *l = thread_get_core_local(); in thread_get_ctx_regs() local
699 assert(l->curr_thread != THREAD_ID_INVALID); in thread_get_ctx_regs()
700 return &threads[l->curr_thread].regs; in thread_get_ctx_regs()
707 struct thread_core_local *l; in thread_set_foreign_intr() local
709 l = thread_get_core_local(); in thread_set_foreign_intr()
711 assert(l->curr_thread != THREAD_ID_INVALID); in thread_set_foreign_intr()
714 threads[l->curr_thread].flags |= in thread_set_foreign_intr()
722 threads[l->curr_thread].flags &= in thread_set_foreign_intr()
731 struct thread_core_local *l; in thread_restore_foreign_intr() local
733 l = thread_get_core_local(); in thread_restore_foreign_intr()
735 assert(l->curr_thread != THREAD_ID_INVALID); in thread_restore_foreign_intr()
737 if (threads[l->curr_thread].flags & THREAD_FLAGS_FOREIGN_INTR_ENABLE) in thread_restore_foreign_intr()