Sujet : Re: OT: Windows (Was: Re: Open Source does not mean easily
De : rweikusat (at) *nospam* talktalk.net (Rainer Weikusat)
Groupes : comp.unix.programmerDate : 07. Jan 2025, 17:13:41
Autres entêtes
Message-ID : <87ttaa7gay.fsf@doppelsaurus.mobileactivedefense.com>
References : 1 2 3 4 5
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
cross@spitfire.i.gajendra.net (Dan Cross) writes:
[...]
there is no reason you cannot, say, have a signal handler that
broadcasts on a condition variable after an asynchronous IO operation
completes, thus waking up a thread.
The pthread_cond_* calls are not async-signal safe and hence, this is
either undefined behaviour (newly introduced with POSIX.1-2024) or
undefined behaviour if the signal handler interrupted something that
isn't async-signal safe (prior to POSIX.1-2024 and still retained in the
current text).
However, POSIX semaphores can safely be used for that.