cleanup: More comments in timer.h

Indicate when usleep() and udelay() may be called.

No code changes, just comments.

BUG=none
BRANCH=none
TEST=Build any platform.  Heck, it's just comments.

Change-Id: I0182c153c29965b25d5294d838c1406c30115099
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/177452
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
Randall Spangler
2013-11-20 13:57:13 -08:00
committed by chrome-internal-fetch
parent 7f5019c9e3
commit 5524ba7bf7

View File

@@ -60,6 +60,9 @@ int timestamp_expired(timestamp_t deadline, const timestamp_t *now);
/**
* Busy-wait.
*
* This may be called with interrupts disabled, at any time after timer_init()
* has been called.
*
* Note that calling this with us>1000 may impact system performance; use
* usleep() for longer delays.
*
@@ -74,12 +77,16 @@ void udelay(unsigned us);
* perhaps longer, if a higher-priority task is running when the delay
* expires).
*
* This may only be called from a task function, with interrupts enabled.
*
* @param us Number of microseconds to sleep.
*/
void usleep(unsigned us);
/**
* Sleep for milliseconds
* Sleep for milliseconds.
*
* Otherwise the same as usleep().
*
* @param ms Number of milliseconds to sleep.
*/
@@ -91,6 +98,8 @@ static inline void msleep(unsigned ms)
/**
* Sleep for seconds
*
* Otherwise the same as usleep().
*
* @param sec Number of seconds to sleep.
*/
static inline void sleep(unsigned sec)