[LTP] [PATCH v1 2/2] lib: moves test infrastructure states into a shared context structure
Petr Vorel
pvorel@suse.cz
Thu Jun 5 08:56:15 CEST 2025
Hi all,
...
> > case TBROK:
> > - tst_atomic_inc(&results->broken);
> > + tst_atomic_inc((int *)&results->broken);
> > break;
> This gets ugly. I guess that it would be better to keep the results as
> int unless we change the tst_atomic.h to work with int32_t.
> Maybe we can actually drop the assembly fallbacks from tst_atomic.h
> since as far as I can tell the __atomic_*() functions were added to
> gcc-4.7 and the __sync_*() function were added into gcc-4.1 so unless we
> need to support compiler older than 4.1 we can drop the assembly and
> easily add support for atomic operations for int32_t.
I suppose we can safely remove the fallbacks. FYI the latest gcc we care about
the oldest SLES 12-SP3 we still support is 4.8.5. And of course, this release
has newer non-default gcc (up to gcc 9).
Kind regards,
Petr
More information about the ltp
mailing list