diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-02-14 19:39:41 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-02-21 14:41:05 +0000 |
commit | 4d4da20ce7e4eebc6b4467d193cb7cec4cfeb17a (patch) | |
tree | dfdc3974fee6395334b7b919980bb349c2d50b9d /dbus/dbus-threads.c | |
parent | e90b160011b262c4d1d5e11b0099f60929077f3f (diff) | |
download | dbus-4d4da20ce7e4eebc6b4467d193cb7cec4cfeb17a.tar.gz |
Make _dbus_mutex_new, _dbus_mutex_free static
They're only called within their module.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=43744
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Thiago Macieira <thiago@kde.org>
Diffstat (limited to 'dbus/dbus-threads.c')
-rw-r--r-- | dbus/dbus-threads.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/dbus/dbus-threads.c b/dbus/dbus-threads.c index 37b68ba2..5eda6f10 100644 --- a/dbus/dbus-threads.c +++ b/dbus/dbus-threads.c @@ -47,6 +47,8 @@ static DBusList *uninitialized_condvar_list = NULL; /** This is used for the no-op default mutex pointer, just to be distinct from #NULL */ #define _DBUS_DUMMY_CONDVAR ((DBusCondVar*)0xABCDEF2) +static void _dbus_mutex_free (DBusMutex *mutex); + /** * @defgroup DBusThreadsInternals Thread functions * @ingroup DBusInternals @@ -57,15 +59,7 @@ static DBusList *uninitialized_condvar_list = NULL; * @{ */ -/** - * Creates a new mutex using the function supplied to dbus_threads_init(), - * or creates a no-op mutex if threads are not initialized. - * May return #NULL even if threads are initialized, indicating - * out-of-memory. - * - * @returns new mutex or #NULL - */ -DBusMutex* +static DBusMutex * _dbus_mutex_new (void) { if (thread_functions.recursive_mutex_new) @@ -77,9 +71,13 @@ _dbus_mutex_new (void) } /** - * This does the same thing as _dbus_mutex_new. It however - * gives another level of indirection by allocating a pointer - * to point to the mutex location. This allows the threading + * Creates a new mutex using the function supplied to dbus_threads_init(), + * or creates a no-op mutex if threads are not initialized. + * May return #NULL even if threads are initialized, indicating + * out-of-memory. + * + * The extra level of indirection given by allocating a pointer + * to point to the mutex location allows the threading * module to swap out dummy mutexes for real a real mutex so libraries * can initialize threads even after the D-Bus API has been used. * @@ -102,11 +100,7 @@ _dbus_mutex_new_at_location (DBusMutex **location_p) } } -/** - * Frees a mutex created with dbus_mutex_new(); does - * nothing if passed a #NULL pointer. - */ -void +static void _dbus_mutex_free (DBusMutex *mutex) { if (mutex) |