summaryrefslogtreecommitdiff
path: root/kern/rtmutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'kern/rtmutex.h')
-rw-r--r--kern/rtmutex.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/kern/rtmutex.h b/kern/rtmutex.h
index bc76b773..f8b11bd6 100644
--- a/kern/rtmutex.h
+++ b/kern/rtmutex.h
@@ -75,6 +75,8 @@ rtmutex_trylock(struct rtmutex *rtmutex)
* unbounded priority inversion.
*
* A mutex can only be locked once.
+ *
+ * This function may sleep.
*/
static inline void
rtmutex_lock(struct rtmutex *rtmutex)
@@ -88,6 +90,16 @@ rtmutex_lock(struct rtmutex *rtmutex)
}
}
+/*
+ * Lock a real-time mutex, with a time boundary.
+ *
+ * The time boundary is an absolute time in ticks.
+ *
+ * If successful, the mutex is locked, otherwise an error is returned.
+ * A mutex can only be locked once.
+ *
+ * This function may sleep.
+ */
static inline int
rtmutex_timedlock(struct rtmutex *rtmutex, uint64_t ticks)
{