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

Function done_safely

components/drivers/ipc/utest/completion_tc.c:44–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42static struct rt_semaphore _thr_exit_sem;
43
44static 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
63static void wait_safely(struct rt_completion *completion)
64{

Callers 2

producer_thread_entryFunction · 0.70
consumer_thread_entryFunction · 0.70

Calls 4

rt_completion_wakeupFunction · 0.85
rt_thread_yieldFunction · 0.85
rt_thread_deleteFunction · 0.85
rt_thread_selfFunction · 0.85

Tested by

no test coverage detected