Discussion:
Making the creation of atomic_flag optional
(too old to reply)
Philipp Klaus Krause
2024-02-02 10:18:39 UTC
Permalink
Currently, atomics are an all-or-nothing choice (via __SDTC_NO_ATOMICS__).

I'd like to see a third option: support atomics, except for the creation
of atomic_flag from allocated storage (or raw character arrays). This
would make it feasible to implement atomics for some low-end systems,
that otherwise can't support them efficiently.

Your opinions on the proposal and the proposed wording are welcome:
http://www.colecovision.eu/stuff/proposal-atomic_flag.html

Philipp
David Brown
2024-02-03 11:09:22 UTC
Permalink
Post by Philipp Klaus Krause
Currently, atomics are an all-or-nothing choice (via __SDTC_NO_ATOMICS__).
I'd like to see a third option: support atomics, except for the creation
of atomic_flag from allocated storage (or raw character arrays). This
would make it feasible to implement atomics for some low-end systems,
that otherwise can't support them efficiently.
http://www.colecovision.eu/stuff/proposal-atomic_flag.html
Philipp
I think it is fine to implement parts of the atomics - you just can't
define the __SDTC_NO_ATOMICS__ symbol unless you cover it all.
Philipp Klaus Krause
2024-02-08 07:44:36 UTC
Permalink
Post by David Brown
I think it is fine to implement parts of the atomics - you just can't
define the __SDTC_NO_ATOMICS__ symbol unless you cover it all.
The problem here is that there are architectures, where atomics could be
implemented except for one small issue - you can't use a char array (or
allocated memory) as an atomic_flag. IMO, it would be good if this
situation could be reflected in the standard.

Philipp

Loading...