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

Function rt_thread_wakeup_set

src/thread.c:1162–1173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1160RTM_EXPORT(rt_thread_wakeup);
1161
1162void rt_thread_wakeup_set(struct rt_thread *thread, rt_wakeup_func_t func, void* user_data)
1163{
1164 rt_sched_lock_level_t slvl;
1165
1166 RT_ASSERT(thread != RT_NULL);
1167 RT_ASSERT(rt_object_get_type((rt_object_t)thread) == RT_Object_Class_Thread);
1168
1169 rt_sched_lock(&slvl);
1170 thread->wakeup_handle.func = func;
1171 thread->wakeup_handle.user_data = user_data;
1172 rt_sched_unlock(slvl);
1173}
1174RTM_EXPORT(rt_thread_wakeup_set);
1175#endif
1176/**

Callers 2

_do_send_recv_timeoutFunction · 0.85

Calls 3

rt_object_get_typeFunction · 0.85
rt_sched_lockFunction · 0.70
rt_sched_unlockFunction · 0.70

Tested by

no test coverage detected