tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: is NetBSD's pthread_setcancelstate() async-signal-safe?



Richard Hansen <rhansen%bbn.com@localhost> wrote:
 |On 2014-05-22 13:44, Steffen Nurpmeso wrote:
 |> Richard Hansen <rhansen%bbn.com@localhost> wrote:
 |>> Hi all,
 |>>
 |>> The Austin Group (POSIX standards body) is currently considering the
 |>> following bug report:
 |>> 
 |>>     Bug #615: pthread_setcancelstate should be async-signal-safe
 |>>     http://austingroupbugs.net/view.php?id=615
 [.]
 |> I remember a message from Mr. Boehm that said so.
 |
 |Are you referring to:
 |http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3910.html
 |
 |Notable quote from the above document:
 |
 |    In particular, we do not want to reinvent Posix' notion of
 |    async-signal-safe functions here.

Oh, thank you for this pointer, i didn't look wether something
moved there in the meanwhile before replying.  That document is
good to read (even more for an ISO C standard track).

 |> So how can this question be answered, then?
 |
 |According to the POSIX Issue 7 definition of async-signal-safe.  (Issue
 |7 is based on C99, so any changes made in C11 and later are irrelevant
 |for this bug, as is anything related to C++.)

To add something of value, i personally would favour a new `async'
keyword which would act rather like RTLD_NOW does, but on
a per-variable level.  To give each any every programmer a defined
tool for defining herself wether a TLS or otherwise "dynamic"ally
linked variable is usable in a signal handler or not.
One ELF section more or less, noone cares these days anyway.

 |Hope this helps,

Indeed it did!
Ciao,

--steffen


Home | Main Index | Thread Index | Old Index