Deutsch   English   Français   Italiano  
<v8rcdc$11umu$1@dont-email.me>

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

Path: ...!news.nobody.at!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.lang.c
Subject: Re: C compilers with at least C11 threads, atomics and membars?
Date: Mon, 5 Aug 2024 22:24:11 +0200
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <v8rcdc$11umu$1@dont-email.me>
References: <v8p2rd$9gvr$2@dont-email.me>
 <pan$6f56f$50bd0c20$f5f1332a$2f3e1017@invalid.invalid>
 <Gk7sO.81541$MC82.76098@fx17.iad>
 <pan$df898$6ee0fa6a$e144ee56$4d4fcc26@invalid.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 05 Aug 2024 22:24:12 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="369ba3c01c7ff249c727a67679ed4047";
	logging-data="1112798"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX186wBf5wp36A9GyKTw0/6N8ht1vnTjGXOc="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:sOS93rEQr+sfGVzKl4HhCLCY9Nc=
In-Reply-To: <pan$df898$6ee0fa6a$e144ee56$4d4fcc26@invalid.invalid>
Content-Language: en-GB, nb-NO
Bytes: 2471

On 05/08/2024 20:51, Blue-Maned_Hawk wrote:
> Scott Lurndal wrote:
> 
>> Blue-Maned_Hawk <bluemanedhawk@invalid.invalid> writes:
>>> Standard C threading and atomics are part of the standard library, not
>>> the compiler.  I don't know what you mean by the term ‘membars’, but if
>>> you could define that, i might be able to answer.
>>>
>>>
>> They are referring to various forms of barrier instructions used to
>> synchronize memory accesses between independent processors.
>>
>> I think you'll find that the compilers do have a role to play with
>> respect to standard C threading and atomics.
> 
> Standard C threading and atomics are accomplished through subroutines
> defined in the standard library in headers that need not be supported by
> freestanding implementations.
> 
> 
> 

Atomics - including the _Atomic keyword - are discussed throughout the C 
standards, not just in the standard library sections.  Fences (aka 
barriers) are also discussed long before the library part.  It may be 
that people use the standard library headers to access these features, 
and they are optional in a given implementation, but they are very much 
an integrated part of compilers and not merely functions declared in 
headers.