Hallo Darryl,

thank you very much for your helpful explanations and the time you spent
on showing more details about what's really going on.

My issue indeed was very much about the visibility of environmental global data 
to threads, about sharing of data, buffers and (error) flags and about passing 
parameters
and return values. Not every code that appearently works is necessarily correct
and portable (e.g. the omitted volatile in my example).

Perhaps it might be a good idea to add some more explanations about 
inter-thread visibility of stored data to the "Multithreaded Programming Guide".

Wrong assumptions about the visibility of data might cause elusive bugs.
On the other hand an unnecessary excessive use of locks/mutexes 
might end up in ugly code that is difficult to maintain and where there is
an increased risk of running into deadlock pitfalls.

Thank your very much for your help!

(Sorry for the late answer - been away from office)
-- 
This message posted from opensolaris.org

Reply via email to