Deutsch   English   Français   Italiano  
<vk2u43$39s1q$2@dont-email.me>

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

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Newsgroups: comp.arch
Subject: Re: Memory ordering
Date: Thu, 19 Dec 2024 21:08:19 -0800
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <vk2u43$39s1q$2@dont-email.me>
References: <vfono1$14l9r$1@dont-email.me>
 <5yqdnU9eL_Y_GKv6nZ2dnZfqn_GdnZ2d@supernews.com>
 <2024Nov15.082512@mips.complang.tuwien.ac.at> <vh7ak1$3cm56$1@dont-email.me>
 <20241115152459.00004c86@yahoo.com> <vh8bn7$3j6ql$1@dont-email.me>
 <vhb2dc$73fe$1@dont-email.me> <vhct2q$lk1b$2@dont-email.me>
 <2024Nov17.161752@mips.complang.tuwien.ac.at> <vhh16e$1lp5h$1@dont-email.me>
 <2024Dec3.100144@mips.complang.tuwien.ac.at> <vin2rp$3ofc$1@dont-email.me>
 <3aa9f0a3d3dde86193abb1c01e52d03a@www.novabbs.org>
 <pz%3P.63771$vLg2.34039@fx17.iad> <86wmgejgxv.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 20 Dec 2024 06:08:20 +0100 (CET)
Injection-Info: dont-email.me; posting-host="90d0359d260b5ab20f7104a3aa6ad836";
	logging-data="3469370"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX197HzKhTOwT7YVWbQ2v40VAElMauDTcTiw="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:DuTVycxj5UuPWjNUbRXpivnk10U=
In-Reply-To: <86wmgejgxv.fsf@linuxsc.com>
Content-Language: en-US
Bytes: 2495

On 12/5/2024 7:19 AM, Tim Rentsch wrote:
> scott@slp53.sl.home (Scott Lurndal) writes:
> 
>> mitchalsup@aol.com (MitchAlsup1) writes:
>>
>>> On Tue, 3 Dec 2024 13:59:18 +0000, jseigh wrote:
>>>
>>>> The compiler is allow to reorder code as long as it knows the
>>>> reordering can't be observed or detected.
>>>
>>> With exceptions enabled, this would allow for almost no code
>>> movement at all.
>>>
>>>>                                            If there are places
>>>> in the code it doesn't know this can't happen it won't optimize
>>>> across it, more or less.
>>>
>>> The problem is HOW to TELL the COMPILER that these memory references
>>> are "more special" than normal--when languages give few mechanisms.
>>
>> C and C++ have the 'volatile' keyword for this purpose.
> 
> A problem with using volatile is that volatile doesn't do what
> most people think it does, especially with respect to what
> reordering is or is not allowed.

Ditto.