From fcdb23537dfb11e5f37418898203e2c36417c9aa Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Fri, 12 Jan 2018 00:02:27 +0100 Subject: kern/rtmutex: add comments --- kern/rtmutex.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'kern/rtmutex.h') 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) { -- cgit v1.2.3