Skip to content

Commit 88d4ae7

Browse files
committed
include/sys/util: Fix WAIT_FOR for POSIX_ARCH
WAIT_FOR is a busy wait loop, which in the POSIX ARCH should include a very minor delay in each iteration. After this fix, tests/lib/sys_util does not need to exclude native_posix anymore. Signed-off-by: Alberto Escolar Piedras <[email protected]>
1 parent f37ecf5 commit 88d4ae7

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

include/zephyr/sys/util.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,7 @@ char *utf8_lcpy(char *dst, const char *src, size_t n);
617617
uint32_t start = k_cycle_get_32(); \
618618
while (!(expr) && (cycle_count > (k_cycle_get_32() - start))) { \
619619
delay_stmt; \
620+
Z_SPIN_DELAY(10); \
620621
} \
621622
(expr); \
622623
})

tests/lib/sys_util/testcase.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
tests:
22
libraries.sys_util:
3-
platform_exclude: native_posix native_posix_64
43
tags: sys_util

0 commit comments

Comments
 (0)