Thread functions
[D-Bus low-level public API]

dbus_threads_init() More...

Functions

dbus_bool_t dbus_threads_init (const DBusThreadFunctions *functions)
 Initializes threads.
dbus_bool_t dbus_threads_init_default (void)
 Initializes threads.

Detailed Description

dbus_threads_init()

Functions and macros related to threads and thread locks.


Function Documentation

dbus_bool_t dbus_threads_init ( const DBusThreadFunctions functions  ) 

Initializes threads.

If this function is not called, the D-Bus library will not lock any data structures. If it is called, D-Bus will do locking, at some cost in efficiency. Note that this function must be called BEFORE the second thread is started.

Use dbus_threads_init_default() if you don't need a particular thread implementation.

This function may be called more than once. The first one wins.

Parameters:
functions functions for using threads
Returns:
TRUE on success, FALSE if no memory

Definition at line 528 of file dbus-threads.c.

References _dbus_assert, _dbus_assert_not_reached, _dbus_current_generation, DBusThreadFunctions::condvar_free, DBusThreadFunctions::condvar_new, DBusThreadFunctions::condvar_wait, DBusThreadFunctions::condvar_wait_timeout, DBusThreadFunctions::condvar_wake_all, DBusThreadFunctions::condvar_wake_one, FALSE, DBusThreadFunctions::mask, DBusThreadFunctions::mutex_free, DBusThreadFunctions::mutex_lock, DBusThreadFunctions::mutex_new, DBusThreadFunctions::mutex_unlock, NULL, DBusThreadFunctions::recursive_mutex_free, DBusThreadFunctions::recursive_mutex_lock, DBusThreadFunctions::recursive_mutex_new, DBusThreadFunctions::recursive_mutex_unlock, and TRUE.

Referenced by dbus_threads_init_default().

dbus_bool_t dbus_threads_init_default ( void   ) 

Initializes threads.

If this function is not called, the D-Bus library will not lock any data structures. If it is called, D-Bus will do locking, at some cost in efficiency. Note that this function must be called BEFORE the second thread is started.

This function may be called more than once. The first one wins.

Returns:
TRUE on success, FALSE if no memory

Definition at line 984 of file dbus-threads.c.

References dbus_threads_init(), and FALSE.


Generated on Fri Oct 20 11:46:26 2006 for D-Bus by  doxygen 1.4.7