diff options
author | Richard Braun <rbraun@sceen.net> | 2018-01-12 00:02:27 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2018-01-12 00:08:06 +0100 |
commit | fcdb23537dfb11e5f37418898203e2c36417c9aa (patch) | |
tree | ffdd0d432e1bee4f9b57c09f2216b296f717f67c /kern/rtmutex.h | |
parent | c43b8068b6e613da3a24a1b5e6b765e5eebbbd6c (diff) |
kern/rtmutex: add comments
Diffstat (limited to 'kern/rtmutex.h')
-rw-r--r-- | kern/rtmutex.h | 12 |
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) { |