[Openais] [PATCH] thread safe totemip_print
Steven Dake
sdake at redhat.com
Fri Aug 11 16:44:10 PDT 2006
Well none of totem is thread safe at the moment and I don't intend it to
be thread safe internally ever (ok thats a long time, but for a long
time to come). Adding all of this makes debugging a real pain of totem
core. All access to totem is controlled through a few mutex'es which
prevent totemip_print from being executed at the same time.
Services on the other hand may use multiple threads, and in this case
they should use an interface like totemip_print_r as you have developed.
Then cluster services should use totemip_print_r if they intend to use
threads.
Am I missing something here? Did you see some particular error? Rather
then change all of the core, I'd prefer two interfaces (one for internal
totem use, since totem blocks all threads through its mutexes) and one
for external use or in the error paths you find.
Regards
-steve
On Fri, 2006-08-11 at 17:02 +0200, Fabien THOMAS wrote:
> While starting my test on redundant ring i've seen that totemip_print
> is not thread safe (return a static buffer).
>
> Find a patch attached to solve that. Any comment before commit ?
>
> Fabien
>
> _______________________________________________
> Openais mailing list
> Openais at lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/openais
More information about the Openais
mailing list