mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-02-06 03:40:02 +00:00
use best_effort_wfe_or_timeout instead of wfe (#1404)
This commit is contained in:
parent
778221ba99
commit
74b9ea4d46
@ -71,8 +71,7 @@ bool multicore_fifo_pop_timeout_us(uint64_t timeout_us, uint32_t *out) {
|
|||||||
// If nothing there yet, we wait for an event first,
|
// If nothing there yet, we wait for an event first,
|
||||||
// to try and avoid too much busy waiting
|
// to try and avoid too much busy waiting
|
||||||
while (!multicore_fifo_rvalid()) {
|
while (!multicore_fifo_rvalid()) {
|
||||||
__wfe();
|
if (best_effort_wfe_or_timeout(end_time)) return false;
|
||||||
if (time_reached(end_time)) return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*out = sio_hw->fifo_rd;
|
*out = sio_hw->fifo_rd;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user