[rtems commit] tests: atomic support for RTEMS. Uniprocessor tests for atomic ops.

Gedare Bloom gedare at rtems.org
Fri Feb 8 01:17:13 UTC 2013


I suppose the question is whether we want to let code that includes
the atomics compile for an unsupported CPU. I think we should define a
minimal stub that allows the code to compile and assert(false) so that
any user that actually tries it will get an obvious failure.

An alternate solution would be to use automagic to prevent the
spatomic* from being included. Maybe if we had an experimental flag :)

-Gedare


On Thu, Feb 7, 2013 at 7:57 PM, Joel Sherrill <Joel.Sherrill at oarcorp.com> wrote:
> Can cpu.h note if they are available?
>
> Or a short stub for which satisfies the CPP but notes it is not supported. Compiling is one thing.. Running is another. If the test can know when it is NA that would work.
>
> Gedare Bloom <gedare at rtems.org> wrote:
>
>
> On Thu, Feb 7, 2013 at 5:15 PM, Gedare Bloom <gedare at rtems.org> wrote:
>> Module:    rtems
>> Branch:    master
>> Commit:    fb9fa1537a9765eae90124e5db5770ae7a527d5e
>> Changeset: http://git.rtems.org/rtems/commit/?id=fb9fa1537a9765eae90124e5db5770ae7a527d5e
>>
>> Author:    WeiY <wei.a.yang at gmail.com>
>> Date:      Fri Jan 25 23:59:49 2013 +0800
>>
>> tests: atomic support for RTEMS. Uniprocessor tests for atomic ops.
>>
>
> The tests do not compile for sis at least. Maybe broken for other
> targets that do not have the atomics defined?
>
> In file included from ../../../../../sis/lib/include/rtems/rtems/atomic.h:26:0,
>                  from
> ../../../../../../../../rtems/c/src/../../testsuites/sptests/spatomic01/tasks.c:19:
> ../../../../../sis/lib/include/rtems/score/atomic.h:21:35: fatal
> error: rtems/score/cpuatomic.h: No such file or directory
> compilation terminated.
>
> $> find cpukit/score -name cpuatomic.h
> cpukit/score/cpu/i386/rtems/score/cpuatomic.h
> cpukit/score/cpu/powerpc/rtems/score/cpuatomic.h
>
> We should have some kind of stubs so that non-supported architectures
> will compile the atomic tests.
>
> -Gedare
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel



More information about the devel mailing list