Jonathan Neuschäfer has uploaded this change for review. ( https://review.coreboot.org/21589
Change subject: timer: Add helper function stopwatch_wait_until_expired ......................................................................
timer: Add helper function stopwatch_wait_until_expired
Change-Id: Ia888907028d687e3d17e5a088657086a3c839ad3 Signed-off-by: Jonathan Neuschäfer j.neuschaefer@gmx.net --- M src/include/timer.h 1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/21589/1
diff --git a/src/include/timer.h b/src/include/timer.h index 6b7baaf..7264250 100644 --- a/src/include/timer.h +++ b/src/include/timer.h @@ -166,6 +166,15 @@ }
/* + * Tick and check the stopwatch as long as it has not expired. + */ +static inline void stopwatch_wait_until_expired(struct stopwatch *sw) +{ + while (stopwatch_expired(sw)) + ; +} + +/* * Return number of microseconds since starting the stopwatch. */ static inline long stopwatch_duration_usecs(struct stopwatch *sw)