Functions | |
DBusMutex * | _dbus_mutex_new (void) |
Creates a new mutex using the function supplied to dbus_threads_init(), or creates a no-op mutex if threads are not initialized. | |
void | _dbus_mutex_free (DBusMutex *mutex) |
Frees a mutex created with dbus_mutex_new(); does nothing if passed a NULL pointer. | |
dbus_bool_t | _dbus_mutex_lock (DBusMutex *mutex) |
Locks a mutex. | |
dbus_bool_t | _dbus_mutex_unlock (DBusMutex *mutex) |
Unlocks a mutex. | |
DBusCondVar * | _dbus_condvar_new (void) |
Creates a new condition variable using the function supplied to dbus_threads_init(), or creates a no-op condition variable if threads are not initialized. | |
void | _dbus_condvar_free (DBusCondVar *cond) |
Frees a conditional variable created with dbus_condvar_new(); does nothing if passed a NULL pointer. | |
void | _dbus_condvar_wait (DBusCondVar *cond, DBusMutex *mutex) |
Atomically unlocks the mutex and waits for the conditions variable to be signalled. | |
dbus_bool_t | _dbus_condvar_wait_timeout (DBusCondVar *cond, DBusMutex *mutex, int timeout_milliseconds) |
Atomically unlocks the mutex and waits for the conditions variable to be signalled, or for a timeout. | |
void | _dbus_condvar_wake_one (DBusCondVar *cond) |
If there are threads waiting on the condition variable, wake up exactly one. | |
void | _dbus_condvar_wake_all (DBusCondVar *cond) |
If there are threads waiting on the condition variable, wake up all of them. |
Functions and macros related to threads and thread locks.
|
Creates a new condition variable using the function supplied to dbus_threads_init(), or creates a no-op condition variable if threads are not initialized. May return NULL even if threads are initialized, indicating out-of-memory.
Definition at line 120 of file dbus-threads.c. References DBusThreadFunctions::condvar_new. Referenced by _dbus_connection_new_for_transport(). |
|
Atomically unlocks the mutex and waits for the conditions variable to be signalled. Locks the mutex again before returning. Does nothing if passed a NULL pointer. Definition at line 146 of file dbus-threads.c. References DBusThreadFunctions::condvar_wait. |
|
Atomically unlocks the mutex and waits for the conditions variable to be signalled, or for a timeout. Locks the mutex again before returning. Does nothing if passed a NULL pointer.
Definition at line 166 of file dbus-threads.c. References DBusThreadFunctions::condvar_wait, DBusThreadFunctions::condvar_wait_timeout, and TRUE. |
|
If there are threads waiting on the condition variable, wake up all of them. Does nothing if passed a NULL pointer. Definition at line 194 of file dbus-threads.c. References DBusThreadFunctions::condvar_wake_all. |
|
If there are threads waiting on the condition variable, wake up exactly one. Does nothing if passed a NULL pointer. Definition at line 182 of file dbus-threads.c. References DBusThreadFunctions::condvar_wake_one. |
|
Locks a mutex. Does nothing if passed a NULL pointer. Locks are not recursive.
Definition at line 89 of file dbus-threads.c. References DBusThreadFunctions::mutex_lock, and TRUE. Referenced by _dbus_data_slot_allocator_alloc(), _dbus_data_slot_allocator_free(), _dbus_data_slot_list_get(), and _dbus_data_slot_list_set(). |
|
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.
Definition at line 63 of file dbus-threads.c. References DBusThreadFunctions::mutex_new. Referenced by _dbus_connection_new_for_transport(), and _dbus_server_init_base(). |
|
Unlocks a mutex. Does nothing if passed a NULL pointer.
Definition at line 103 of file dbus-threads.c. References DBusThreadFunctions::mutex_unlock, and TRUE. Referenced by _dbus_data_slot_allocator_alloc(), _dbus_data_slot_allocator_free(), _dbus_data_slot_list_get(), and _dbus_data_slot_list_set(). |