| 1160 | RTM_EXPORT(rt_thread_wakeup); |
| 1161 | |
| 1162 | void 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 | } |
| 1174 | RTM_EXPORT(rt_thread_wakeup_set); |
| 1175 | #endif |
| 1176 | /** |
no test coverage detected