dbus-threads.h File Reference

#include <stdapis/dbus-1.0/dbus/dbus-threads.h>

Typedef DBusMutex

typedef struct DBusMutexDBusMutex

An opaque mutex type provided by the DBusThreadFunctions implementation installed by dbus_threads_init().

Typedef DBusCondVar

typedef struct DBusCondVarDBusCondVar

An opaque condition variable type provided by the DBusThreadFunctions implementation installed by dbus_threads_init().

Typedef DBusMutexNewFunction

typedef DBusMutex *(*DBusMutexNewFunction

Deprecated, provide DBusRecursiveMutexNewFunction instead.

Typedef DBusMutexFreeFunction

typedef void(*DBusMutexFreeFunction

Deprecated, provide DBusRecursiveMutexFreeFunction instead.

Typedef DBusMutexLockFunction

typedef dbus_bool_t(*DBusMutexLockFunction

Deprecated, provide DBusRecursiveMutexLockFunction instead. Return value is lock success, but gets ignored in practice.

Typedef DBusMutexUnlockFunction

typedef dbus_bool_t(*DBusMutexUnlockFunction

Deprecated, provide DBusRecursiveMutexUnlockFunction instead. Return value is unlock success, but gets ignored in practice.

Typedef DBusRecursiveMutexNewFunction

typedef DBusMutex *(*DBusRecursiveMutexNewFunction

Creates a new recursively-lockable mutex, or returns NULL if not enough memory. Can only fail due to lack of memory. Found in DBusThreadFunctions. Do not just use PTHREAD_MUTEX_RECURSIVE for this, because it does not save/restore the recursion count when waiting on a condition. libdbus requires the Java-style behavior where the mutex is fully unlocked to wait on a condition.

Typedef DBusRecursiveMutexFreeFunction

typedef void(*DBusRecursiveMutexFreeFunction

Frees a recursively-lockable mutex. Found in DBusThreadFunctions.

Typedef DBusRecursiveMutexLockFunction

typedef void(*DBusRecursiveMutexLockFunction

Locks a recursively-lockable mutex. Found in DBusThreadFunctions. Can only fail due to lack of memory.

Typedef DBusRecursiveMutexUnlockFunction

typedef void(*DBusRecursiveMutexUnlockFunction

Unlocks a recursively-lockable mutex. Found in DBusThreadFunctions. Can only fail due to lack of memory.

Typedef DBusCondVarNewFunction

typedef DBusCondVar *(*DBusCondVarNewFunction

Creates a new condition variable. Found in DBusThreadFunctions. Can only fail (returning NULL) due to lack of memory.

Typedef DBusCondVarFreeFunction

typedef void(*DBusCondVarFreeFunction

Frees a condition variable. Found in DBusThreadFunctions.

Typedef DBusCondVarWaitFunction

typedef void(*DBusCondVarWaitFunction

Waits on a condition variable. Found in DBusThreadFunctions. Must work with either a recursive or nonrecursive mutex, whichever the thread implementation provides. Note that PTHREAD_MUTEX_RECURSIVE does not work with condition variables (does not save/restore the recursion count) so don't try using simply pthread_cond_wait() and a PTHREAD_MUTEX_RECURSIVE to implement this, it won't work right.

Has no error conditions. Must succeed if it returns.

Typedef DBusCondVarWaitTimeoutFunction

typedef dbus_bool_t(*DBusCondVarWaitTimeoutFunction

Waits on a condition variable with a timeout. Found in DBusThreadFunctions. Returns TRUE if the wait did not time out, and FALSE if it did.

Has no error conditions. Must succeed if it returns.

Typedef DBusCondVarWakeOneFunction

typedef void(*DBusCondVarWakeOneFunction

Wakes one waiting thread on a condition variable. Found in DBusThreadFunctions.

Has no error conditions. Must succeed if it returns.

Typedef DBusCondVarWakeAllFunction

typedef void(*DBusCondVarWakeAllFunction

Wakes all waiting threads on a condition variable. Found in DBusThreadFunctions.

Has no error conditions. Must succeed if it returns.