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

Function _lwp_timer_event_from_tid

components/libc/compilers/common/ctime.c:833–851  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

831};
832
833static void _lwp_timer_event_from_tid(struct rt_work *work, void *param)
834{
835 rt_err_t ret;
836 struct lwp_timer_event_param *data = rt_container_of(work, struct lwp_timer_event_param, work);
837 rt_thread_t thread;
838
839 RT_ASSERT(data->tid);
840
841 /* stop others from delete thread */
842 thread = lwp_tid_get_thread_and_inc_ref(data->tid);
843 /** The tid of thread is a READ ONLY value, but here still facing the risk of thread already been delete error */
844 ret = lwp_thread_signal_kill(thread, data->signo, SI_TIMER, 0);
845 lwp_tid_dec_ref(thread);
846
847 if (ret)
848 {
849 LOG_D("%s: Do kill failed(tid %d) returned %d", __func__, data->tid, ret);
850 }
851}
852
853static void _lwp_timer_event_from_pid(struct rt_work *work, void *param)
854{

Callers

nothing calls this directly

Calls 3

lwp_thread_signal_killFunction · 0.85
lwp_tid_dec_refFunction · 0.85

Tested by

no test coverage detected