Path: ...!news.mixmin.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Rainer Weikusat Newsgroups: comp.unix.programmer Subject: Re: OT: Windows (Was: Re: Open Source does not mean easily Date: Tue, 07 Jan 2025 16:13:41 +0000 Lines: 15 Message-ID: <87ttaa7gay.fsf@doppelsaurus.mobileactivedefense.com> References: <677c7a1b$0$28501$426a74cc@news.free.fr> Mime-Version: 1.0 Content-Type: text/plain X-Trace: individual.net GAcOKP1JwE/gG3p98ARSJwLwUla9RIll8KmCNsRIAw84VKVkQ= Cancel-Lock: sha1:mR/I2ToVzo9yOFgen3tNnyQRFv4= sha1:+VvsW6jmHugGuBgHV5s3kBhYISA= sha256:MK21mBUADIlf+UdlCQxsHpUCE1EC6Epfh7uC2HOgd8g= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Bytes: 1509 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.