DBusMutex and DBusCondVar

Havoc Pennington hp at redhat.com
Fri Nov 4 21:00:56 PST 2005


On Fri, 2005-11-04 at 17:25 -0800, venugopalan trd wrote:
> I'm looking for definitions of these 2 structures in
> the 0.50 sources and could not locate it. I'm planning
> to use DBUS in multithreaded mode and to achieve this
> I need these 2 structures.
> 
> Am I missing something? Any help is really
> appreciated.

These are not defined by libdbus, they are provided by the binding such
as libdbus-glib. If you're using the raw lowlevel API, you have to
implement threads yourself and pass in your implementation using
dbus_threads_init(). Or alternatively, use libdbus from only one thread
at a time.

If you only care about modern unix flavors then implementing the
dbus-threads.h interface should be a trivial wrapper around pthreads.
You could copy dbus-gthread.c as an example, replacing the glib thread
calls with pthread stuff.

Havoc




More information about the dbus mailing list