Commit b22db989 authored by Daniel Leung's avatar Daniel Leung Committed by Fabio Baltieri
Browse files

sys: rename local variables in WAIT_FOR()



This renames the local variables in WAIT_FOR() to make them
more unique to avoid them being shadow variables.

Signed-off-by: default avatarDaniel Leung <daniel.leung@intel.com>
parent 7c208be1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -668,9 +668,9 @@ char *utf8_lcpy(char *dst, const char *src, size_t n);
 */
#define WAIT_FOR(expr, timeout, delay_stmt)                                                        \
	({                                                                                         \
		uint32_t cycle_count = k_us_to_cyc_ceil32(timeout);                                \
		uint32_t start = k_cycle_get_32();                                                 \
		while (!(expr) && (cycle_count > (k_cycle_get_32() - start))) {                    \
		uint32_t _wf_cycle_count = k_us_to_cyc_ceil32(timeout);                            \
		uint32_t _wf_start = k_cycle_get_32();                                             \
		while (!(expr) && (_wf_cycle_count > (k_cycle_get_32() - _wf_start))) {            \
			delay_stmt;                                                                \
			Z_SPIN_DELAY(10);                                                          \
		}                                                                                  \