Deutsch   English   Français   Italiano  
<jwvcye3twfr.fsf-monnier+comp.arch@gnu.org>

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

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Stefan Monnier <monnier@iro.umontreal.ca>
Newsgroups: comp.arch
Subject: Re: MSI interrupts
Date: Wed, 26 Mar 2025 15:41:02 -0400
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <jwvcye3twfr.fsf-monnier+comp.arch@gnu.org>
References: <vqto79$335c6$1@dont-email.me>
	<e4ecfb53ef4f33f10b6d2548d5930159@www.novabbs.org>
	<vrva4r$9ka$1@reader1.panix.com>
	<b1c74762d01f71cc1b8ac838dcf6d4fa@www.novabbs.org>
	<vrvukp$n29$1@reader1.panix.com>
	<7a093bbb356e3bda3782c15ca27e98a7@www.novabbs.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Wed, 26 Mar 2025 20:41:10 +0100 (CET)
Injection-Info: dont-email.me; posting-host="a5cef5f456ac4d031e41d6eb24bc20eb";
	logging-data="2566998"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19OtWbFde+KHOwzjvECJXsDL465C2MmbiM="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:KG0OtxmqZ2S4W0bIXGs2o2P7dhI=
	sha1:9cIAN6csdRXZvBGwJatIKxKDFqc=
Bytes: 1545

>> uint32_t
>> xcas(volatile Spinlock *lk, uint32_t expected, uint32_t val)
>> {
>> 	uint32_t v = esmLOCKload(&lk->lock);
>> 	if (v == expected) esmLOCKstore(&lk->lock, val);
>> 	return v;
>> }
>
> Yes, unless you want the alternate exit strategy, this works fine.

How does ESM know that the "event" is complete when the code doesn't go
through the final `esmLOCKstore`?


        Stefan