[Openais] [PATCH] thread safe totemip_print
Fabien THOMAS
fabien.thomas at netasq.com
Mon Aug 14 00:13:43 PDT 2006
There is also another issue while using totemip_print 2 times in a
prinft for example:
printf("%s %s", totemip_print(...), totemip_print(...));
but if you prefer the old form i can leave it as you want.
Regards,
Fabien
Le 12 août 06 à 01:44, Steven Dake a écrit :
> 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