[PATCH] Re: Threading problems in (Win)DBus
hp at redhat.com
Tue Jul 10 07:21:31 PDT 2007
Good catch, I would do the patch differently:
- leave all the stuff protected by connection->mutex as bitfields,
including the have_connection_lock flag
- move dispatch_acquired and io_path_acquired down below the bitfields
and make them dbus_bool_t instead of bitfields
This is an opaque struct so there is no binary compat concern.
Only 8 bytes more should be needed, since there's no problem with the
bit fields in general, only with the two flags protected by a different
I would also put a small comment before the two dbus_bool_t like
"/* not a bitfield because all bits in a bitfield must be protected by
the same mutex */"
If these changes make sense to you I will just make them, it isn't
necessary to redo the patch.
Thanks for the fix, I would not have found this very quickly ;-)
More information about the dbus