Am 13.04.2017 um 23:40 schrieb Tsuyoshi SASAMOTO:
...oh. So errno is actually threadsafe, but its "address" is the same in
every thread? Interesting.

MT-Safe errno of Solaris is implemented as a function,
so its address is same but the value is different.
cf. https://src.illumos.org/source/xref/illumos-gate/usr/src/head/errno.h
    
https://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libc/port/gen/errno.c

I saw it in the header file, but actually testing it on Solaris 10 Sparc showed that the address was different as well in different threads. Can you try on you system as well?

Regards,

Rainer

Reply via email to