| 186 | } |
| 187 | |
| 188 | static 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 |
no test coverage detected