MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / _thread_exit

Function _thread_exit

src/thread.c:117–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115#endif
116
117static void _thread_exit(void)
118{
119 struct rt_thread *thread;
120 rt_base_t critical_level;
121
122 /* get current thread */
123 thread = rt_thread_self();
124
125 critical_level = rt_enter_critical();
126
127 rt_thread_close(thread);
128
129 _thread_detach_from_mutex(thread);
130
131 /* insert to defunct thread list */
132 rt_thread_defunct_enqueue(thread);
133
134 rt_exit_critical_safe(critical_level);
135
136 /* switch to next task */
137 rt_schedule();
138}
139
140/**
141 * @brief This function is the timeout function for thread, normally which is invoked

Callers

nothing calls this directly

Calls 7

rt_thread_selfFunction · 0.85
rt_thread_closeFunction · 0.85
rt_enter_criticalFunction · 0.70
rt_exit_critical_safeFunction · 0.70
rt_scheduleFunction · 0.70

Tested by

no test coverage detected