]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Add api doc to _dbus_platform_c|rmutex_new()
authorRalf Habacker <ralf.habacker@freenet.de>
Mon, 21 Feb 2022 15:07:48 +0000 (16:07 +0100)
committerRalf Habacker <ralf.habacker@freenet.de>
Wed, 2 Mar 2022 08:03:40 +0000 (09:03 +0100)
The documentation has been added to the header to avoid duplication as
these functions are implemented platform specific.

Cherry-picked from merge request dbus/dbus!243

Reviewed-by: @smcv
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
dbus/dbus-threads-internal.h

index c2e786e2e1e1161647ee86e953ca2761974f9469..aa7810acfea4975d87dd55b9c5e469dfdeef27a8 100644 (file)
@@ -73,11 +73,24 @@ void         _dbus_condvar_free_at_location  (DBusCondVar      **location_p);
 
 /* Private to threading implementations and dbus-threads.c */
 
+/**
+ * Creates a new mutex which is recursive if possible
+ *
+ * This mutex is used to avoid deadlocking if we hold them while
+ * calling user code.
+ *
+ * @return  mutex instance or #NULL on OOM
+ */
 DBusRMutex  *_dbus_platform_rmutex_new       (void);
 void         _dbus_platform_rmutex_free      (DBusRMutex       *mutex);
 void         _dbus_platform_rmutex_lock      (DBusRMutex       *mutex);
 void         _dbus_platform_rmutex_unlock    (DBusRMutex       *mutex);
 
+/**
+ * Creates a new mutex suitable for use with condition variables
+ *
+ * @return  mutex instance or #NULL on OOM
+ */
 DBusCMutex  *_dbus_platform_cmutex_new       (void);
 void         _dbus_platform_cmutex_free      (DBusCMutex       *mutex);
 void         _dbus_platform_cmutex_lock      (DBusCMutex       *mutex);