[patch] Add a level of abstraction to condvars and mutexes so we can initalize them late

Havoc Pennington hp at redhat.com
Tue Aug 15 10:09:52 PDT 2006


John (J5) Palmieri wrote:
> Here is the patch.  I need to write a test case but perhaps other may
> spot something I missed.  One question on my mind is if the data-slots
> API needs to use the extra overhead of the abstraction because it seems
> to use mutexes in a very self contained way. i.e. the _dbus_mutex_new is
> freed at the end of the function it is called in and the rest of the
> D-Bus API uses data-slots with global locks that don't need to be
> abstracted.

Why do you need _at_location for anything except new/free ? the 
lock/unlock/wait methods should not need this afaict.

Not sure I understand the question about data slots. They are using 
global mutexes, but you do have to replace the reference to the global 
mutex in the data slot allocator object, if you replace the global mutex 
itself.

Havoc



More information about the dbus mailing list