[coreboot-gerrit] Change in coreboot[master]: timer: Add helper function stopwatch_wait_until_expired
Jonathan Neuschäfer (Code Review)
gerrit at coreboot.org
Mon Sep 18 21:27:42 CEST 2017
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 at 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)
--
To view, visit https://review.coreboot.org/21589
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia888907028d687e3d17e5a088657086a3c839ad3
Gerrit-Change-Number: 21589
Gerrit-PatchSet: 1
Gerrit-Owner: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170918/9da01182/attachment.html>
More information about the coreboot-gerrit
mailing list