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

Function _sched_thread_process_signal

src/scheduler_mp.c:755–778  ·  view source on GitHub ↗

* @brief Process pending signals for the current thread * * @param current_thread The thread to process signals for * * @details This function: * - Locks the scheduler to ensure thread safety * - Checks if the thread has pending signals * - If signals are pending: * * Clears the pending flag * * Unlocks the scheduler * * Calls s

Source from the content-addressed store, hash-verified

753 * - If no signals pending, simply unlocks the scheduler
754 */
755static void _sched_thread_process_signal(struct rt_thread *current_thread)
756{
757 rt_base_t level;
758 SCHEDULER_LOCK(level);
759
760 /* check stat of thread for signal */
761 if (RT_SCHED_CTX(current_thread).stat & RT_THREAD_STAT_SIGNAL_PENDING)
762 {
763 extern void rt_thread_handle_sig(rt_bool_t clean_state);
764
765 RT_SCHED_CTX(current_thread).stat &= ~RT_THREAD_STAT_SIGNAL_PENDING;
766
767 SCHEDULER_UNLOCK(level);
768
769 /* check signal status */
770 rt_thread_handle_sig(RT_TRUE);
771 }
772 else
773 {
774 SCHEDULER_UNLOCK(level);
775 }
776
777 /* lock is released above */
778}
779
780#define SCHED_THREAD_PREPROCESS_SIGNAL(pcpu, curthr) \
781 do \

Callers

nothing calls this directly

Calls 1

rt_thread_handle_sigFunction · 0.85

Tested by

no test coverage detected