| 57 | } |
| 58 | |
| 59 | static void _signal_entry(void *parameter) |
| 60 | { |
| 61 | RT_UNUSED(parameter); |
| 62 | |
| 63 | rt_thread_t tid = rt_thread_self(); |
| 64 | |
| 65 | /* handle signal */ |
| 66 | rt_thread_handle_sig(RT_FALSE); |
| 67 | |
| 68 | #ifdef RT_USING_SMP |
| 69 | #else |
| 70 | /* return to thread */ |
| 71 | tid->sp = tid->sig_ret; |
| 72 | tid->sig_ret = RT_NULL; |
| 73 | #endif /* RT_USING_SMP */ |
| 74 | |
| 75 | LOG_D("switch back to: 0x%08x\n", tid->sp); |
| 76 | RT_SCHED_CTX(tid).stat &= ~RT_THREAD_STAT_SIGNAL; |
| 77 | |
| 78 | #ifdef RT_USING_SMP |
| 79 | rt_hw_context_switch_to((rt_uintptr_t)¶meter, tid); |
| 80 | #else |
| 81 | rt_hw_context_switch_to((rt_uintptr_t)&(tid->sp)); |
| 82 | #endif /* RT_USING_SMP */ |
| 83 | } |
| 84 | |
| 85 | /* |
| 86 | * To deliver a signal to thread, there are cases: |
nothing calls this directly
no test coverage detected