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

Function _wait_until_update

components/drivers/ipc/completion_mp.c:188–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188static rt_base_t _wait_until_update(struct rt_completion *completion, rt_base_t expected)
189{
190 rt_base_t current_value;
191
192 /* spinning for update */
193 do
194 {
195 rt_hw_isb();
196 current_value =
197 IPC_LOAD(&completion->susp_thread_n_flag, memory_order_relaxed);
198 } while (current_value == expected);
199
200 return current_value;
201}
202
203/**
204 * Try to suspend thread and update completion

Callers 1

_comp_susp_threadFunction · 0.85

Calls 1

rt_hw_isbFunction · 0.50

Tested by

no test coverage detected