[PATCH] Re: Threading problems in (Win)DBus
Havoc Pennington
hp at redhat.com
Tue Jul 10 07:21:31 PDT 2007
Hi,
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
lock, right?
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 ;-)
Havoc
More information about the dbus
mailing list