summaryrefslogtreecommitdiff
path: root/kern/rtmutex.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-01-12 00:02:27 +0100
committerRichard Braun <rbraun@sceen.net>2018-01-12 00:08:06 +0100
commitfcdb23537dfb11e5f37418898203e2c36417c9aa (patch)
treeffdd0d432e1bee4f9b57c09f2216b296f717f67c /kern/rtmutex.h
parentc43b8068b6e613da3a24a1b5e6b765e5eebbbd6c (diff)
kern/rtmutex: add comments
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)
{