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

Function done_safely

components/drivers/ipc/utest/completion_timeout_tc.c:59–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59static void done_safely(struct rt_completion *completion)
60{
61 rt_err_t error;
62
63 /* Signal completion */
64 error = rt_completion_wakeup(completion);
65
66 /* try again if failed to produce */
67 if (error == -RT_EEMPTY)
68 {
69 rt_thread_yield();
70 }
71 else if (error)
72 {
73 uassert_true(error == RT_EOK);
74 _test_thread_exit_failure("unexpected error");
75 }
76}
77
78static void wait_safely(struct rt_completion *completion)
79{

Callers 2

producer_thread_entryFunction · 0.70
consumer_thread_entryFunction · 0.70

Calls 3

rt_completion_wakeupFunction · 0.85
rt_thread_yieldFunction · 0.85

Tested by

no test coverage detected