Main Page | Modules | Data Structures | Directories | File List | Data Fields | Related Pages

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

dbus_threads_init() More...

Functions

dbus_bool_t dbus_threads_init (const DBusThreadFunctions *functions)
 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 using any other D-BUS functions.

This function may be called more than once, as long as you pass in the same functions each time. If it's called multiple times with different functions, then a warning is printed, because someone is confused.

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

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

References _dbus_assert, _dbus_current_generation, _dbus_warn(), 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, and TRUE.

Referenced by dbus_g_thread_init().


Generated on Wed Jan 3 04:49:06 2007 for D-BUS by  doxygen 1.4.4