Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Stefan Monnier 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: References: <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