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

Function _sched_thread_preprocess_signal

src/scheduler_mp.c:724–739  ·  view source on GitHub ↗

* @brief Preprocess pending signals for a suspended thread * * @param current_thread The thread to check for pending signals * * @details This function checks if the specified thread is suspended and has pending signals. * If both conditions are met, it will wake up/resume the thread to process the signals. */

Source from the content-addressed store, hash-verified

722 * If both conditions are met, it will wake up/resume the thread to process the signals.
723 */
724static void _sched_thread_preprocess_signal(struct rt_thread *current_thread)
725{
726 /* should process signal? */
727 if (rt_sched_thread_is_suspended(current_thread))
728 {
729 /* if current_thread signal is in pending */
730 if ((RT_SCHED_CTX(current_thread).stat & RT_THREAD_STAT_SIGNAL_MASK) & RT_THREAD_STAT_SIGNAL_PENDING)
731 {
732#ifdef RT_USING_SMART
733 rt_thread_wakeup(current_thread);
734#else
735 rt_thread_resume(current_thread);
736#endif
737 }
738 }
739}
740
741/**
742 * @brief Process pending signals for the current thread

Callers

nothing calls this directly

Calls 3

rt_thread_wakeupFunction · 0.85
rt_thread_resumeFunction · 0.85

Tested by

no test coverage detected