Skip to content

Commit 4545832

Browse files
[nrf fromtree] soc: nordic: nrf54h: gpd: yield() to not block if main is coop
The main thread, if configured with coop priority (don't do that :D) breaks gpd since it has a non yielding while loop (also don't do that) Add an explicit yield() to allow other threads to run if main or other threads use gpd with coop prio. Signed-off-by: Bjarki Arge Andreasen <[email protected]> (cherry picked from commit 7e0e583)
1 parent a35da4f commit 4545832

File tree

1 file changed

+2
-0
lines changed
  • soc/nordic/nrf54h/gpd

1 file changed

+2
-0
lines changed

soc/nordic/nrf54h/gpd/gpd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ static int nrf_gpd_sync(struct gpd_onoff_manager *gpd_mgr)
139139
if (atomic_test_bit(&gpd_service_status, GPD_SERVICE_REQ_OK)) {
140140
return 0;
141141
}
142+
143+
k_yield();
142144
}
143145

144146
LOG_ERR("nRFs GDPWR request timed out");

0 commit comments

Comments
 (0)