/src/ |
A D | scheduler_comm.c | 201 RT_SCHED_PRIV(thread).remaining_tick = RT_SCHED_PRIV(thread).init_tick; in rt_sched_thread_yield() 366 RT_SCHED_PRIV(thread).number_mask = 1 << RT_SCHED_PRIV(thread).number; in _rt_sched_update_priority() 369 RT_SCHED_PRIV(thread).number_mask = 1 << RT_SCHED_PRIV(thread).current_priority; in _rt_sched_update_priority() 387 RT_SCHED_PRIV(thread).number_mask = 1 << RT_SCHED_PRIV(thread).number; in _rt_sched_update_priority() 433 struct rt_lwp *lwp = thread ? (struct rt_lwp *)thread->lwp : 0; in rt_scheduler_stack_check() 450 (rt_uintptr_t)thread->sp <= (rt_uintptr_t)thread->stack_addr || in rt_scheduler_stack_check() 452 (rt_uintptr_t)thread->stack_addr + (rt_uintptr_t)thread->stack_size) in rt_scheduler_stack_check() 463 else if ((rt_uintptr_t)thread->sp > ((rt_uintptr_t)thread->stack_addr + thread->stack_size)) in rt_scheduler_stack_check() 465 if ((rt_uintptr_t)thread->sp > ((rt_uintptr_t)thread->stack_addr + thread->stack_size)) in rt_scheduler_stack_check() 473 else if ((rt_uintptr_t)thread->sp <= ((rt_uintptr_t)thread->stack_addr + 32)) in rt_scheduler_stack_check() [all …]
|
A D | thread.c | 205 rt_memset(thread->stack_addr, '#', thread->stack_size); in _thread_init() 210 thread->sp = (void *)rt_hw_stack_init(thread->entry, thread->parameter, in _thread_init() 214 thread->sp = (void *)rt_hw_stack_init(thread->entry, thread->parameter, in _thread_init() 225 thread->event_set = 0; in _thread_init() 245 thread, in _thread_init() 273 rt_memset(&thread->user_ctx, 0, sizeof thread->user_ctx); in _thread_init() 401 thread->parent.name, RT_SCHED_PRIV(thread).current_priority); in rt_thread_startup() 550 _thread_init(thread, in rt_thread_create() 559 return thread; in rt_thread_create() 938 if (thread->lwp) in rt_thread_suspend_to_list() [all …]
|
A D | scheduler_up.c | 432 … RT_SCHED_PRIV(thread).number = RT_SCHED_PRIV(thread).current_priority >> 3; /* 5bit */ in rt_sched_thread_startup() 433 RT_SCHED_PRIV(thread).number_mask = 1L << RT_SCHED_PRIV(thread).number; in rt_sched_thread_startup() 434 …RT_SCHED_PRIV(thread).high_mask = 1L << (RT_SCHED_PRIV(thread).current_priority & 0x07); /* 3bit … in rt_sched_thread_startup() 436 RT_SCHED_PRIV(thread).number_mask = 1L << RT_SCHED_PRIV(thread).current_priority; in rt_sched_thread_startup() 468 RT_SCHED_PRIV(thread).number = 0; in rt_sched_thread_init_priv() 489 RT_ASSERT(thread != RT_NULL); in rt_sched_insert_thread() 495 if (thread == rt_current_thread) in rt_sched_insert_thread() 502 … RT_SCHED_CTX(thread).stat = RT_THREAD_READY | (RT_SCHED_CTX(thread).stat & ~RT_THREAD_STAT_MASK); in rt_sched_insert_thread() 521 rt_thread_ready_table[RT_SCHED_PRIV(thread).number] |= RT_SCHED_PRIV(thread).high_mask; in rt_sched_insert_thread() 541 RT_ASSERT(thread != RT_NULL); in rt_sched_remove_thread() [all …]
|
A D | defunct.c | 33 void rt_thread_defunct_enqueue(rt_thread_t thread) in rt_thread_defunct_enqueue() argument 50 rt_thread_t thread = RT_NULL; in rt_thread_defunct_dequeue() local 61 return thread; in rt_thread_defunct_dequeue() 73 rt_thread_t thread; in rt_defunct_execute() local 81 thread = rt_thread_defunct_dequeue(); in rt_defunct_execute() 82 if (thread == RT_NULL) in rt_defunct_execute() 96 rt_thread_free_sig(thread); in rt_defunct_execute() 100 cleanup = thread->cleanup; in rt_defunct_execute() 113 cleanup(thread); in rt_defunct_execute() 118 if (thread->mem_regions != RT_NULL) in rt_defunct_execute() [all …]
|
A D | scheduler_mp.c | 294 … RT_SCHED_CTX(thread).stat = RT_THREAD_READY | (RT_SCHED_CTX(thread).stat & ~RT_THREAD_STAT_MASK); in _sched_insert_thread_locked() 303 rt_thread_ready_table[RT_SCHED_PRIV(thread).number] |= RT_SCHED_PRIV(thread).high_mask; in _sched_insert_thread_locked() 328 pcpu->ready_table[RT_SCHED_PRIV(thread).number] |= RT_SCHED_PRIV(thread).high_mask; in _sched_insert_thread_locked() 353 RT_NAME_MAX, thread->parent.name, RT_SCHED_PRIV(thread).current_priority); in _sched_insert_thread_locked() 371 rt_thread_ready_table[RT_SCHED_PRIV(thread).number] &= ~RT_SCHED_PRIV(thread).high_mask; in _sched_remove_thread_locked() 388 pcpu->ready_table[RT_SCHED_PRIV(thread).number] &= ~RT_SCHED_PRIV(thread).high_mask; in _sched_remove_thread_locked() 1072 RT_ASSERT(thread != RT_NULL); in rt_sched_insert_thread() 1088 RT_ASSERT(thread != RT_NULL); in rt_sched_remove_thread() 1159 RT_SCHED_PRIV(thread).number_mask = 1L << RT_SCHED_PRIV(thread).number; in rt_sched_thread_startup() 1162 RT_SCHED_PRIV(thread).number_mask = 1L << RT_SCHED_PRIV(thread).current_priority; in rt_sched_thread_startup() [all …]
|
A D | ipc.c | 108 rt_thread_t thread; in rt_susp_list_dequeue() local 125 thread = RT_NULL; in rt_susp_list_dequeue() 139 thread = RT_NULL; in rt_susp_list_dequeue() 145 return thread; in rt_susp_list_dequeue() 167 struct rt_thread *thread; in rt_susp_list_resume_all() local 173 while (thread) in rt_susp_list_resume_all() 226 while (thread); in rt_susp_list_resume_all_irq() 634 return thread->error > 0 ? -thread->error : thread->error; in _rt_sem_take() 2003 if ((thread->event_set & event->set) == thread->event_set) in rt_event_send() 2014 thread->event_set = thread->event_set & event->set; in rt_event_send() [all …]
|
A D | kservice.c | 119 RT_UNUSED(thread); in rt_hw_backtrace_frame_get() 135 RT_UNUSED(thread); in rt_hw_backtrace_frame_unwind() 397 rt_thread_t thread = rt_thread_self(); in rt_backtrace() local 404 rt_hw_backtrace_frame_unwind(thread, &frame); in rt_backtrace() 406 return rt_backtrace_frame(thread, &frame); in rt_backtrace() 479 if (!thread) in rt_backtrace_to_buffer() 494 rt_hw_backtrace_frame_unwind(thread, frame); in rt_backtrace_to_buffer() 519 rt_err_t rt_backtrace_thread(rt_thread_t thread) in rt_backtrace_thread() argument 523 if (thread) in rt_backtrace_thread() 525 rc = rt_hw_backtrace_frame_get(thread, &frame); in rt_backtrace_thread() [all …]
|
A D | clock.c | 105 struct rt_thread *thread = rt_thread_self(); in _update_process_times() local 108 if (!LWP_IS_USER_MODE(thread)) in _update_process_times() 110 thread->user_time += tick; in _update_process_times() 115 thread->system_time += tick; in _update_process_times() 116 if (thread == pcpu->idle_thread) in _update_process_times()
|
A D | Kconfig | 10 Each kernel object, such as thread, timer, semaphore etc, has a name, 93 prompt "The maximal level value of priority of thread" 124 each thread switch. 132 thread context switch etc. 161 int "The stack size of idle thread" 166 int "The stack size of system thread (for defunct etc.)" 171 bool "Enable software timer with a timer thread" 175 thread. 179 int "The priority level value of timer thread" 183 int "The stack size of timer thread" [all …]
|
A D | mempool.c | 285 struct rt_thread *thread; in rt_mp_alloc() local 292 thread = rt_thread_self(); in rt_mp_alloc() 310 thread->error = RT_EOK; in rt_mp_alloc() 313 … rt_thread_suspend_to_list(thread, &mp->suspend_thread, RT_IPC_FLAG_FIFO, RT_UNINTERRUPTIBLE); in rt_mp_alloc() 321 rt_timer_control(&(thread->thread_timer), in rt_mp_alloc() 324 rt_timer_start(&(thread->thread_timer)); in rt_mp_alloc() 333 if (thread->error != RT_EOK) in rt_mp_alloc()
|
A D | mem.c | 66 rt_uint8_t thread[8]; /**< thread name */ member 68 rt_uint8_t thread[4]; /**< thread name */ member 106 for (index = 0; index < sizeof(mem->thread); index ++) in rt_smem_setname() 109 mem->thread[index] = name[index]; in rt_smem_setname() 112 for (; index < sizeof(mem->thread); index ++) in rt_smem_setname() 114 mem->thread[index] = ' '; in rt_smem_setname() 652 … rt_kprintf("] %c%c%c%c", mem->thread[0], mem->thread[1], mem->thread[2], mem->thread[3]); in memtrace()
|
A D | cpu_mp.c | 215 void rt_cpus_lock_status_restore(struct rt_thread *thread) in rt_cpus_lock_status_restore() argument 218 lwp_aspace_switch(thread); in rt_cpus_lock_status_restore() 220 rt_sched_post_ctx_switch(thread); in rt_cpus_lock_status_restore()
|
A D | timer.c | 595 rt_thread_t thread; in rt_timer_start() local 599 thread = rt_container_of(timer, struct rt_thread, thread_timer); in rt_timer_start() 600 RT_ASSERT(rt_object_get_type(&thread->parent) == RT_Object_Class_Thread); in rt_timer_start() 601 rt_sched_thread_timer_start(thread); in rt_timer_start()
|