On 22/01/21 22:26, Laszlo Ersek wrote:
That seems bogus, per POSIX, given that all signals except SIGUSR2 are
included in the mask passed to sigsuspend().

What happens if you get a SIGSTOP at exactly the wrong time? (Yeah I know how incredibly unlikely that would be).

BTW if we are in a mood for cleanup, there's no reason to use pthread_key_t instead of __thread + qemu_thread_atexit_add (adding a Notifier to struct CoroutineThreadState). That would fix the issue with async-signal safety of pthread_getspecific.

(It makes sense for the function not to be async-signal safe since it can in principle allocate memory for the data. In practice it's most likely okay if the function has been called before on this thread).

Paolo


Reply via email to