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 <> wrote:
 |On 2014-05-22 13:44, Steffen Nurpmeso wrote:
 |> Richard Hansen <> 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
 |> I remember a message from Mr. Boehm that said so.
 |Are you referring to:
 |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!


Home | Main Index | Thread Index | Old Index