Deutsch   English   Français   Italiano  
<87ttaa7gay.fsf@doppelsaurus.mobileactivedefense.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.mixmin.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Rainer Weikusat <rweikusat@talktalk.net>
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: <uu54la$3su5b$6@dont-email.me> <vlgud7$1mgh5$1@dont-email.me>
	<vlh5ag$1nruu$1@dont-email.me>
	<677c7a1b$0$28501$426a74cc@news.free.fr>
	<vljbvv$gl9$1@reader2.panix.com>
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.