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

Function sys_sched_yield

components/lwp/lwp_syscall.c:8814–8818  ·  view source on GitHub ↗

* @brief Relinquish the processor voluntarily. * * This function causes the calling thread to yield the processor, allowing other threads * that are ready to run to execute. The thread will be placed back into the scheduler's * ready queue and may be rescheduled according to its priority and the system's scheduling policy. * * @return sysret_t Returns `0` on success. On failure, returns a ne

Source from the content-addressed store, hash-verified

8812 * explicitly determines it no longer needs the processor at the moment.
8813 */
8814sysret_t sys_sched_yield(void)
8815{
8816 rt_thread_yield();
8817 return 0;
8818}
8819
8820/**
8821 * @brief Retrieve the scheduling parameters of a specific thread.

Callers

nothing calls this directly

Calls 1

rt_thread_yieldFunction · 0.85

Tested by

no test coverage detected