[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Question about Atomics support in TCC

From: Michael Matz
Subject: Re: [Tinycc-devel] Question about Atomics support in TCC
Date: Mon, 11 Apr 2022 18:03:53 +0200 (CEST)
User-agent: Alpine 2.21 (LSU 202 2017-01-01)


On Fri, 8 Apr 2022, Davidson Francis wrote:

Hi Domingo, thanks for the additional data. That's exactly what I've
observed here: no type of lock or special instruction is generated,
nor is a function call generated either.

I'm not well-versed with compilers, but looking through the source
code (tccgen.c) it looks like atomic types are just handled like
their non-atomic counterparts, and that's why the generated code is
non-atomic, like any other primitive type .

So it seems to me that atomic support is still incomplete,

That's correct. _Atomic isn't correctly supported by TCC as of now. Meaning: it's parsed and tracked as type qualifier and hence whose mismatch is warned about in conversions, but has no other effect, in particular nothing about guaranteeing atomic accesses. Patches welcome :)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]