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

Function rt_sched_thread_close

src/scheduler_comm.c:178–183  ·  view source on GitHub ↗

* @brief Close a thread by setting its status to CLOSED * * @param thread The thread to be closed * @return rt_err_t Always returns RT_EOK on success * * @details This function: * - Requires scheduler lock to be held (RT_SCHED_DEBUG_IS_LOCKED) * - Sets the thread's status to RT_THREAD_CLOSE * * @note Must be called with scheduler lock held */

Source from the content-addressed store, hash-verified

176 * @note Must be called with scheduler lock held
177 */
178rt_err_t rt_sched_thread_close(struct rt_thread *thread)
179{
180 RT_SCHED_DEBUG_IS_LOCKED;
181 RT_SCHED_CTX(thread).stat = RT_THREAD_CLOSE;
182 return RT_EOK;
183}
184
185/**
186 * @brief Yield the current thread's remaining time slice

Callers 1

rt_thread_closeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected