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

Function rt_sched_lock

src/scheduler_mp.c:565–575  ·  view source on GitHub ↗

* @brief Lock the system scheduler * * @param plvl Pointer to the object where lock level stores to * * @return rt_err_t * - RT_EOK on success * - -RT_EINVAL if plvl is NULL * * @note This function has both MP version and UP version. */

Source from the content-addressed store, hash-verified

563 * @note This function has both MP version and UP version.
564 */
565rt_err_t rt_sched_lock(rt_sched_lock_level_t *plvl)
566{
567 rt_base_t level;
568 if (!plvl)
569 return -RT_EINVAL;
570
571 SCHEDULER_LOCK(level);
572 *plvl = level;
573
574 return RT_EOK;
575}
576
577/**
578 * @brief Unlock the scheduler and restore the interrupt level

Callers 1

rt_sched_thread_bind_cpuFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected