• Re: C compilers with at least C11 threads, atomics and membars?

    From Blue-Maned_Hawk@21:1/5 to All on Mon Aug 5 16:41:44 2024
    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.



    --
    Blue-Maned_Hawk│shortens to Hawk│/blu.mɛin.dʰak/│he/him/his/himself/Mr. blue-maned_hawk.srht.site
    [machinery clunks in the background]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to bluemanedhawk@invalid.invalid on Mon Aug 5 16:45:26 2024
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Blue-Maned_Hawk@21:1/5 to Scott Lurndal on Mon Aug 5 18:51:53 2024
    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.



    --
    Blue-Maned_Hawk│shortens to Hawk│/blu.mɛin.dʰak/│he/him/his/himself/Mr. blue-maned_hawk.srht.site
    It is the best kind of possible: theoretically!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to All on Mon Aug 5 22:24:11 2024
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)