25 #ifndef DBUS_THREADS_INTERNAL_H
26 #define DBUS_THREADS_INTERNAL_H
28 #include <dbus/dbus-macros.h>
29 #include <dbus/dbus-types.h>
30 #include <dbus/dbus-threads.h>
71 int timeout_milliseconds);
86 DBUS_EMBEDDED_TESTS_EXPORT
94 DBUS_EMBEDDED_TESTS_EXPORT
95 void _dbus_platform_rmutex_free (
DBusRMutex *mutex);
107 DBUS_EMBEDDED_TESTS_EXPORT
108 void _dbus_platform_rmutex_lock (
DBusRMutex *mutex);
115 DBUS_EMBEDDED_TESTS_EXPORT
116 void _dbus_platform_rmutex_unlock (
DBusRMutex *mutex);
123 DBUS_EMBEDDED_TESTS_EXPORT
130 DBUS_EMBEDDED_TESTS_EXPORT
131 void _dbus_platform_cmutex_free (
DBusCMutex *mutex);
146 DBUS_EMBEDDED_TESTS_EXPORT
147 void _dbus_platform_cmutex_lock (
DBusCMutex *mutex);
154 DBUS_EMBEDDED_TESTS_EXPORT
155 void _dbus_platform_cmutex_unlock (
DBusCMutex *mutex);
158 void _dbus_platform_condvar_free (
DBusCondVar *cond);
159 void _dbus_platform_condvar_wait (
DBusCondVar *cond,
163 int timeout_milliseconds);
164 void _dbus_platform_condvar_wake_one (
DBusCondVar *cond);
#define DBUS_BEGIN_DECLS
Macro used prior to declaring functions in the D-Bus header files.
void _dbus_condvar_wait(DBusCondVar *cond, DBusCMutex *mutex)
Atomically unlocks the mutex and waits for the conditions variable to be signalled.
dbus_bool_t _dbus_condvar_wait_timeout(DBusCondVar *cond, DBusCMutex *mutex, int timeout_milliseconds)
Atomically unlocks the mutex and waits for the conditions variable to be signalled, or for a timeout.
void _dbus_rmutex_new_at_location(DBusRMutex **location_p)
Creates a new mutex or creates a no-op mutex if threads are not initialized.
DBUS_PRIVATE_EXPORT void _dbus_rmutex_unlock(DBusRMutex *mutex)
Unlocks a mutex.
void _dbus_condvar_free(DBusCondVar *cond)
Frees a conditional variable created with dbus_condvar_new(); does nothing if passed a NULL pointer...
dbus_uint32_t dbus_bool_t
A boolean, valid values are TRUE and FALSE.
void _dbus_cmutex_unlock(DBusCMutex *mutex)
Unlocks a mutex.
void _dbus_condvar_new_at_location(DBusCondVar **location_p)
This does the same thing as _dbus_condvar_new.
void _dbus_condvar_wake_one(DBusCondVar *cond)
If there are threads waiting on the condition variable, wake up exactly one.
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_rmutex_free_at_location(DBusRMutex **location_p)
Frees a DBusRMutex; does nothing if passed a NULL pointer.
void _dbus_cmutex_lock(DBusCMutex *mutex)
Locks a mutex.
DBUS_PRIVATE_EXPORT void _dbus_rmutex_lock(DBusRMutex *mutex)
Locks a mutex.
void _dbus_cmutex_free_at_location(DBusCMutex **location_p)
Frees a DBusCMutex; does nothing if passed a NULL pointer.
void _dbus_condvar_free_at_location(DBusCondVar **location_p)
Frees a condition variable; does nothing if passed a NULL pointer.
void _dbus_cmutex_new_at_location(DBusCMutex **location_p)
Creates a new mutex or creates a no-op mutex if threads are not initialized.
#define DBUS_END_DECLS
Macro used after declaring functions in the D-Bus header files.