From: Ralf Habacker Date: Mon, 21 Feb 2022 15:07:48 +0000 (+0100) Subject: Add api doc to _dbus_platform_c|rmutex_new() X-Git-Tag: dbus-1.15.0~99 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b426c7916a98d24e61e6bbbe6c466e4e9b02fef;p=thirdparty%2Fdbus.git 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 --- diff --git a/dbus/dbus-threads-internal.h b/dbus/dbus-threads-internal.h index c2e786e2e..aa7810acf 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);