From 9b426c7916a98d24e61e6bbbe6c466e4e9b02fef Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Mon, 21 Feb 2022 16:07:48 +0100 Subject: [PATCH] Add api doc to _dbus_platform_c|rmutex_new() 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 --- dbus/dbus-threads-internal.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dbus/dbus-threads-internal.h b/dbus/dbus-threads-internal.h index c2e786e2..aa7810ac 100644 --- a/dbus/dbus-threads-internal.h +++ b/dbus/dbus-threads-internal.h @@ -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);