Re: [LTP] [PATCH 2/6] sched_football: Use atomic for ball

Cyril Hrubis
2024-05-07T09:37:02Z

Hi!
> > Wouldn't it make more sense to use the include/tst_atomic.h now instead
> > of the functions from librttest.h. At least the version in the
> > tst_atomic.h have proper memory barries for load, fallback in the case
> > that compiler does not support __atomic_foo(), etc.
>
> I don't object, but trying to include tst_atomic.h causes lots of
> redefinition warnings for PACKAGE, PACKAGE_*, and VERSION which are
> also set from librttest.h -> realtime_config.h
>
> Suggestions on how to proceed there?

The problem obviously is that we have two different config.h files that
conflicts.

Given that there isn't much in the realtime/configure.ac and these
checks does not seem to be relevant anymore it would make sense just to
get rid of it.

What we check for:

PTHREAD_PRIO_INHERIT - likely required for LinuxThreads vs NPTL
exp10 - seems to be supported in glibc since 2.1
__sync_add_and_fetch() - not needed when include/tst_atomic.h is used

Other than that the realtime/configure.ac contains stale data such as
defunct email to the ltp sourceforge mailing list which should be
removed anyways.

--
Cyril Hrubis
chrubis@suse.cz