[PATCH 2/5] libcobalt: improve documentation regarding mutex initializers
nolange79 at gmail.com
Thu Mar 7 14:21:56 CET 2019
Signed-off-by: Norbert Lange <norbert.lange at andritz.com>
lib/cobalt/mutex.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/cobalt/mutex.c b/lib/cobalt/mutex.c
index be9f6ed80..125981d40 100644
@@ -49,8 +49,12 @@
* By default, Cobalt mutexes are of the normal type, use no
* priority protocol and may not be shared between several processes.
- * Note that only pthread_mutex_init() may be used to initialize a mutex, using
- * the static initializer @a PTHREAD_MUTEX_INITIALIZER is not supported.
+ * Note that pthread_mutex_init() should be used to initialize a mutex, using
+ * the static initializer @a PTHREAD_MUTEX_INITIALIZER will delay the
+ * initialization to the first method called on the mutex and will
+ * most likely introduce switches to secondary mode.
+ * The documentation (and specififcally api-tags) of the mutex services assumes
+ * a mutex was explicitely initialised with pthread_mutex_init().
More information about the Xenomai