/components/mprotect/ |
A D | mprotect.c | 24 if (thread->mem_regions != RT_NULL) in rt_mprotect_find_free_region() 43 if (thread->mem_regions != RT_NULL) in rt_mprotect_find_region() 81 if (thread == RT_NULL) in rt_mprotect_add_region() 83 thread = rt_thread_self(); in rt_mprotect_add_region() 85 if (thread->mem_regions == RT_NULL) in rt_mprotect_add_region() 88 if (thread->mem_regions == RT_NULL) in rt_mprotect_add_region() 94 return rt_hw_mpu_add_region(thread, region); in rt_mprotect_add_region() 109 if (thread == RT_NULL) in rt_mprotect_delete_region() 111 thread = rt_thread_self(); in rt_mprotect_delete_region() 128 if (thread == RT_NULL) in rt_mprotect_update_region() [all …]
|
A D | README.md | 5 …MV8-M都提供了内存保护单元,简称MPU(Memory Protection Unit)。[论坛里的这篇文章](https://club.rt-thread.org/ask/article/61… 31 - `rt_err_t rt_mprotect_add_region(rt_thread_t thread, rt_mem_region_t *region)`:添加内存区域 32 - `rt_err_t rt_mprotect_delete_region(rt_thread_t thread, rt_mem_region_t *region)`:删除内存区域 33 - `rt_err_t rt_mprotect_update_region(rt_thread_t thread, rt_mem_region_t *region)`:更新内存区域配置 98 rt_thread_t thread; /* 触发异常的线程 */ 144 /* release thread's stack */ 146 RT_KERNEL_FREE(thread->stack_buf); 148 RT_KERNEL_FREE(thread->stack_addr); 150 /* delete thread object */ 151 rt_object_delete((rt_object_t)thread);
|
/components/libc/cplusplus/cpp11/gcc/ |
A D | thread | 34 class thread 66 thread(const thread&) = delete; 67 thread& operator=(const thread&) = delete; 79 thread(thread&& t) noexcept 84 thread& operator=(thread&& t) noexcept 148 inline void swap(thread& x, thread& y) noexcept 154 inline bool operator==(thread::id x, thread::id y) noexcept 161 inline bool operator!=(thread::id x, thread::id y) noexcept 166 inline bool operator<(thread::id x, thread::id y) noexcept 176 inline bool operator>(thread::id x, thread::id y) noexcept [all …]
|
A D | thread.cpp | 24 thread::invoker_base* t = static_cast<thread::invoker_base*>(p); in execute_native_thread_routine() 25 thread::invoker_base_ptr local; in execute_native_thread_routine() 34 void thread::start_thread(invoker_base_ptr b) in start_thread() 50 thread::~thread() in ~thread() 56 void thread::join() in join() 71 void thread::detach() in detach() 87 unsigned thread::hardware_concurrency() noexcept in hardware_concurrency()
|
/components/lwp/ |
A D | lwp_tid.c | 103 rt_thread_t thread; in lwp_tid_put() local 110 thread = p->data; in lwp_tid_put() 117 thread = RT_NULL; in lwp_tid_put() 119 if (thread && thread->tid_ref_count) in lwp_tid_put() 139 rt_thread_t thread = RT_NULL; in lwp_tid_get_thread_raw() local 146 return thread; in lwp_tid_get_thread_raw() 151 rt_thread_t thread = RT_NULL; in lwp_tid_get_thread_and_inc_ref() local 155 if (thread != RT_NULL) in lwp_tid_get_thread_and_inc_ref() 160 return thread; in lwp_tid_get_thread_and_inc_ref() 166 if (thread) in lwp_tid_dec_ref() [all …]
|
A D | lwp.c | 115 if (thread) in lwp_getcwd() 419 if (thread != RT_NULL) in lwp_execve() 425 thread->tid = tid; in lwp_execve() 428 (rt_size_t)thread->stack_addr + thread->stack_size); in lwp_execve() 462 thread->lwp = lwp; in lwp_execve() 473 rt_memset(thread->user_stack, '#', thread->user_stack_size); in lwp_execve() 511 if (thread) in lwp_user_setting_save() 519 if (!thread) in lwp_user_setting_restore() 561 rt_thread_t thread; in lwp_uthread_ctx_save() local 562 thread = rt_thread_self(); in lwp_uthread_ctx_save() [all …]
|
A D | lwp_pid.c | 605 thread->tid = 0; in _thread_exit() 627 rt_thread_t thread; in lwp_exit() local 690 if (header_thr == thread && thread->sibling.prev == &lwp->t_grp) in lwp_thread_exit() 1239 ptr = (rt_uint8_t *)thread->stack_addr + thread->stack_size; in print_thread_info() 1243 ((rt_uint32_t)thread->sp - (rt_uint32_t)thread->stack_addr), in print_thread_info() 1253 …(thread->stack_size + (rt_uint32_t)(rt_size_t)thread->stack_addr - (rt_uint32_t)(rt_size_t)thread-… in print_thread_info() 1260 rt_kprintf(" %-.*s\n",rt_strlen(thread->parent.name), thread->parent.name); in print_thread_info() 1394 if (!thread->lwp) in lwp_check_exit_request() 1437 rt_thread_t thread; in _wait_sibling_exit() local 1666 rt_thread_t thread; in _lwp_setaffinity() local [all …]
|
A D | lwp_signal.c | 738 struct rt_thread *thread; in lwp_thread_signal_catch() local 745 thread = rt_thread_self(); in lwp_thread_signal_catch() 746 lwp = (struct rt_lwp *)thread->lwp; in lwp_thread_signal_catch() 759 pending = _SIGQ(thread); in lwp_thread_signal_catch() 1217 lwp = thread->lwp; in lwp_thread_signal_kill() 1273 if (thread) in lwp_thread_signal_mask() 1304 lwp = thread->lwp; in _dequeue_signal() 1307 sigqueue = _SIGQ(thread); in _dequeue_signal() 1337 struct rt_lwp *lwp = thread->lwp; in lwp_thread_signal_timedwait() 1399 if (thread->error == RT_EINTR) in lwp_thread_signal_timedwait() [all …]
|
A D | lwp_ipc.c | 126 struct rt_thread *thread; in rt_channel_list_resume() local 345 thread->error = -RT_EINTR; in wakeup_sender_wait_recv() 357 thread->error = -RT_EINTR; in wakeup_sender_wait_reply() 395 thread->error = RT_ETIMEOUT; in sender_timeout() 398 rt_sched_insert_thread(thread); in sender_timeout() 705 struct rt_thread *thread; in rt_raw_channel_reply() local 740 thread = ch->reply; in rt_raw_channel_reply() 768 thread->error = -RT_EINTR; in wakeup_receiver() 786 thread->error = -RT_ETIMEOUT; in receiver_timeout() 794 rt_sched_insert_thread(thread); in receiver_timeout() [all …]
|
A D | lwp_futex.c | 352 rt_timer_start(&(thread->thread_timer)); in _suspend_thread_timeout_locked() 396 rt_thread_t thread; in _futex_wait() local 411 thread = rt_thread_self(); in _futex_wait() 505 rt_thread_t thread; in _futex_requeue() local 603 if (thread == RT_NULL) in _futex_lock_pi() 608 lwp_tid_dec_ref(thread); in _futex_lock_pi() 631 futex->mutex->owner = thread; in _futex_lock_pi() 820 lwp = thread->lwp; in _handle_futex_death() 841 if ((word & FUTEX_TID_MASK) != thread->tid) in _handle_futex_death() 876 void lwp_futex_exit_robust_list(rt_thread_t thread) in lwp_futex_exit_robust_list() argument [all …]
|
A D | lwp_syscall.c | 3263 if (!thread) in sys_thread_create() 3299 if (!thread) in sys_thread_create() 3307 rt_memset(thread->user_stack, '#', thread->user_stack_size); in sys_thread_create() 3399 if (!thread) in _sys_clone() 3450 if (thread) in _sys_clone() 3618 if (!thread) in _sys_fork() 3673 if (thread) in _sys_fork() 3933 (char *)thread->stack_addr + thread->stack_size); in sys_execve() 8790 if (thread) in sys_sched_setparam() 8854 if (thread) in sys_sched_getparam() [all …]
|
/components/vbus/ |
A D | watermark_queue.h | 56 rt_thread_t thread; in rt_wm_que_inc() local 64 thread = rt_thread_self(); in rt_wm_que_inc() 65 thread->error = RT_EOK; in rt_wm_que_inc() 66 rt_thread_suspend(thread); in rt_wm_que_inc() 70 rt_timer_control(&(thread->thread_timer), in rt_wm_que_inc() 73 rt_timer_start(&(thread->thread_timer)); in rt_wm_que_inc() 77 if (thread->error != RT_EOK) in rt_wm_que_inc() 78 return thread->error; in rt_wm_que_inc() 117 rt_thread_t thread; in rt_wm_que_dec() local 119 thread = RT_THREAD_LIST_NODE_ENTRY(wg->suspended_threads.next); in rt_wm_que_dec() [all …]
|
A D | prio_queue.c | 86 rt_thread_t thread; in rt_prio_queue_detach() local 94 thread->error = -RT_ERROR; in rt_prio_queue_detach() 96 rt_thread_resume(thread); in rt_prio_queue_detach() 160 rt_thread_t thread; in rt_prio_queue_push() local 165 rt_thread_resume(thread); in rt_prio_queue_push() 194 rt_thread_t thread; in rt_prio_queue_pop() local 204 thread = rt_thread_self(); in rt_prio_queue_pop() 205 thread->error = RT_EOK; in rt_prio_queue_pop() 206 rt_thread_suspend(thread); in rt_prio_queue_pop() 223 if (thread->error != RT_EOK) in rt_prio_queue_pop() [all …]
|
/components/drivers/ipc/ |
A D | completion_up.c | 31 #define RT_COMPLETION_NEW_STAT(thread, flag) (((flag) & 1) | (((rt_base_t)thread) & ~1)) argument 70 rt_thread_t thread; in rt_completion_wait_flags() local 77 thread = rt_thread_self(); in rt_completion_wait_flags() 95 thread->error = RT_EOK; in rt_completion_wait_flags() 98 result = rt_thread_suspend_with_flag(thread, suspend_flag); in rt_completion_wait_flags() 102 rt_base_t waiting_stat = RT_COMPLETION_NEW_STAT(thread, RT_UNCOMPLETED); in rt_completion_wait_flags() 112 rt_timer_control(&(thread->thread_timer), in rt_completion_wait_flags() 115 rt_timer_start(&(thread->thread_timer)); in rt_completion_wait_flags() 134 result = thread->error; in rt_completion_wait_flags()
|
A D | completion_mp.c | 24 #define RT_COMPLETION_NEW_STAT(thread, flag) (((flag) & 1) | (((rt_base_t)thread) & ~1)) argument 50 rt_thread_t thread, rt_int32_t timeout, 87 rt_thread_t thread; in rt_completion_wait_flags_noisr() local 95 thread = rt_thread_self(); in rt_completion_wait_flags_noisr() 207 rt_thread_t thread, rt_int32_t timeout, in _comp_susp_thread() argument 218 thread->error = RT_EOK; in _comp_susp_thread() 220 error = rt_thread_suspend_with_flag(thread, suspend_flag); in _comp_susp_thread() 233 comp_waiting = RT_COMPLETION_NEW_STAT(thread, RT_UNCOMPLETED); in _comp_susp_thread() 246 rt_timer_control(&(thread->thread_timer), in _comp_susp_thread() 249 rt_timer_start(&(thread->thread_timer)); in _comp_susp_thread() [all …]
|
A D | dataqueue.c | 98 rt_thread_t thread; in rt_data_queue_push() local 108 thread = rt_thread_self(); in rt_data_queue_push() 122 thread->error = RT_EOK; in rt_data_queue_push() 133 rt_timer_control(&(thread->thread_timer), in rt_data_queue_push() 136 rt_timer_start(&(thread->thread_timer)); in rt_data_queue_push() 149 result = thread->error; in rt_data_queue_push() 215 rt_thread_t thread; in rt_data_queue_pop() local 227 thread = rt_thread_self(); in rt_data_queue_pop() 240 thread->error = RT_EOK; in rt_data_queue_pop() 254 rt_timer_start(&(thread->thread_timer)); in rt_data_queue_pop() [all …]
|
/components/drivers/audio/ |
A D | dev_audio_pipe.c | 20 rt_thread_t thread; in _rt_audio_pipe_resume_writer() local 28 rt_thread_resume(thread); in _rt_audio_pipe_resume_writer() 56 rt_thread_t thread; in rt_audio_pipe_read() local 77 thread = rt_thread_self(); in rt_audio_pipe_read() 88 rt_thread_suspend(thread); in rt_audio_pipe_read() 91 &RT_THREAD_LIST_NODE(thread)); in rt_audio_pipe_read() 121 rt_thread_t thread; in _rt_audio_pipe_resume_reader() local 129 rt_thread_resume(thread); in _rt_audio_pipe_resume_reader() 156 rt_thread_t thread; in rt_audio_pipe_write() local 182 thread = rt_thread_self(); in rt_audio_pipe_write() [all …]
|
/components/lwp/arch/risc-v/rv64/ |
A D | lwp_arch.c | 78 void *get_thread_kernel_stack_top(rt_thread_t thread) in get_thread_kernel_stack_top() argument 80 return (void *)(((rt_size_t)thread->stack_addr) + ((rt_size_t)thread->stack_size)); in get_thread_kernel_stack_top() 191 rt_thread_t thread = rt_container_of((unsigned long)thread_sp, struct rt_thread, sp); in arch_set_thread_context() local 192 syscall_frame->tp = (rt_ubase_t)thread->thread_idr; in arch_set_thread_context() 337 int arch_backtrace_uthread(rt_thread_t thread) in arch_backtrace_uthread() argument 342 if (thread && thread->lwp) in arch_backtrace_uthread() 344 stack = thread->user_ctx.ctx; in arch_backtrace_uthread() 345 if ((long)stack > (unsigned long)thread->stack_addr in arch_backtrace_uthread() 346 && (long)stack < (unsigned long)thread->stack_addr + thread->stack_size) in arch_backtrace_uthread() 350 lwp_backtrace_frame(thread, &frame); in arch_backtrace_uthread()
|
/components/finsh/ |
A D | cmd.c | 213 thread = (struct rt_thread *)obj; in list_thread() 222 thread->parent.name, RT_SCHED_CTX(thread).oncpu, in list_thread() 233 …rt_kprintf("%-*.*s %3d ", maxlen, RT_NAME_MAX, thread->parent.name, RT_SCHED_PRIV(thread).current_… in list_thread() 243 ptr = (rt_uint8_t *)thread->stack_addr + thread->stack_size - 1; in list_thread() 247 ((rt_ubase_t)thread->sp - (rt_ubase_t)thread->stack_addr), in list_thread() 248 thread->stack_size, in list_thread() 249 … ((rt_ubase_t)ptr - (rt_ubase_t)thread->stack_addr) * 100 / thread->stack_size, in list_thread() 252 thread); in list_thread() 257 … thread->stack_size + ((rt_ubase_t)thread->stack_addr - (rt_ubase_t)thread->sp), in list_thread() 259 … (thread->stack_size - ((rt_ubase_t) ptr - (rt_ubase_t) thread->stack_addr)) * 100 in list_thread() [all …]
|
/components/libc/posix/pthreads/ |
A D | pthread.c | 46 if (thread >= PTHREAD_NUM_MAX) return NULL; in _pthread_get_data() 49 ptd = pth_table[thread]; in _pthread_get_data() 533 int pthread_detach(pthread_t thread) in pthread_detach() argument 609 ptd = _pthread_get_data(thread); in pthread_join() 709 if(_pthread_get_data(thread) == NULL) in pthread_getcpuclockid() 826 ptd = _pthread_get_data(thread); in pthread_getschedparam() 879 ptd = _pthread_get_data(thread); in pthread_setschedparam() 921 ptd = _pthread_get_data(thread); in pthread_setschedprio() 1099 ptd = _pthread_get_data(thread); in pthread_kill() 1442 int pthread_cancel(pthread_t thread) in pthread_cancel() argument [all …]
|
A D | pthread_cond.c | 370 struct rt_thread *thread; in _pthread_cond_timedwait() local 401 thread = rt_thread_self(); in _pthread_cond_timedwait() 404 thread->error = RT_EOK; in _pthread_cond_timedwait() 407 rt_thread_suspend(thread); in _pthread_cond_timedwait() 410 rt_list_insert_before(&(sem->parent.suspend_thread), &RT_THREAD_LIST_NODE(thread)); in _pthread_cond_timedwait() 422 rt_timer_control(&(thread->thread_timer), in _pthread_cond_timedwait() 425 rt_timer_start(&(thread->thread_timer)); in _pthread_cond_timedwait() 437 result = thread->error; in _pthread_cond_timedwait()
|
/components/libc/posix/libdl/ |
A D | dlmodule.c | 135 rt_thread_suspend(thread); in _dlmodule_exit() 210 rt_thread_close(thread); in dlmodule_destroy_subthread() 216 if (thread->cleanup != RT_NULL) in dlmodule_destroy_subthread() 217 thread->cleanup(thread); in dlmodule_destroy_subthread() 222 rt_thread_free_sig(thread); in dlmodule_destroy_subthread() 228 rt_object_detach((rt_object_t)thread); in dlmodule_destroy_subthread() 234 RT_KERNEL_FREE(thread->stack_addr); in dlmodule_destroy_subthread() 236 rt_object_delete((rt_object_t)thread); in dlmodule_destroy_subthread() 796 rt_thread_t thread; in dlmodule_exit() local 821 thread = module->main_thread; in dlmodule_exit() [all …]
|
/components/lwp/arch/aarch64/cortex-a/ |
A D | lwp_arch.c | 243 int arch_backtrace_uthread(rt_thread_t thread) in arch_backtrace_uthread() argument 248 if (thread && thread->lwp) in arch_backtrace_uthread() 250 stack = thread->user_ctx.ctx; in arch_backtrace_uthread() 251 if ((long)stack > (unsigned long)thread->stack_addr in arch_backtrace_uthread() 252 && (long)stack < (unsigned long)thread->stack_addr + thread->stack_size) in arch_backtrace_uthread() 256 lwp_backtrace_frame(thread, &frame); in arch_backtrace_uthread()
|
/components/drivers/sdio/ |
A D | Kconfig | 8 int "The stack size for sdio irq thread" 12 int "The priority level value of sdio irq thread" 16 int "The stack size for mmcsd thread" 20 int "The priority level value of mmcsd thread"
|
/components/libc/ |
A D | posix-info.txt | 188 % getc_unlocked() ; thread safe in the default 195 % putc_unlocked() ; thread safe in the default 197 % putchar_unlocked() ; thread safe in the default 236 % rand_r() ; thread safe in the default 262 % strerror_r() ; thread safe in the default 272 % strtok_r() ; thread safe in the default 309 - tzname ; you should better use 'tz_xxx' in the rt-thread. 310 - tzset() ; you should better use 'tz_xxx' in the rt-thread. 316 % fdatasync() ;smaller ranther than <fsync>, in the rt-thread, it is universal
|