| 42 | static struct rt_semaphore _thr_exit_sem; |
| 43 | |
| 44 | static void done_safely(struct rt_completion *completion) |
| 45 | { |
| 46 | rt_err_t error; |
| 47 | |
| 48 | /* Signal completion */ |
| 49 | error = rt_completion_wakeup(completion); |
| 50 | |
| 51 | /* try again if failed to produce */ |
| 52 | if (error == -RT_EEMPTY) |
| 53 | { |
| 54 | rt_thread_yield(); |
| 55 | } |
| 56 | else if (error) |
| 57 | { |
| 58 | uassert_false(0); |
| 59 | rt_thread_delete(rt_thread_self()); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | static void wait_safely(struct rt_completion *completion) |
| 64 | { |
no test coverage detected