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

yangwei weiyang wei.a.yang at gmail.com
Wed Feb 13 16:28:40 UTC 2013


OK i am studying how to implement a common ISR_Disable and ISR_Enable
ops to simulate atomic ops. But it is just for the UP architectures,
for SMP architectures which are not supported by atomic now this will
not be suitable.

2013/2/14 Gedare Bloom <gedare at rtems.org>:
> On Wed, Feb 13, 2013 at 11:22 AM, yangwei weiyang <wei.a.yang at gmail.com> wrote:
>> I will add some ops-stubs to other architectures which are not
>> supported atomic functions now. It will pass the compiler problem but
>> atomic function will not be implemented really. Then it will not be  a
>> conditional API.
>>
> Can you implement the atomic ops using ISR_Disable and ISR_Enable?
> Then you can provide a common cpuatomic.h that includes these
> implementations. Yes they will be "heavy", but they will at least be
> functional.
>
>> 2013/2/13 Ralf Corsepius <ralf.corsepius at rtems.org>:
>>> On 02/08/2013 01:41 AM, Gedare Bloom 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?
>>>
>>>
>>> RTEMS doesn't compile for all targets which do not have a file named
>>> rtems/score/cpuatomic.h.
>>>
>>> i.e. all targets but the powerpc and the i386.
>>>
>>>
>>>> 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.
>>>
>>> Well, I agree to some extend, but ...
>>>
>>> ... I feel this is playing with symptoms.
>>>
>>> The actual issue behind all this, is the atomic-API currently being
>>> implemented as a conditional API - This is not good.
>>>
>>> I an ideal world, one would not have any conditional API, but would have a
>>> target-independent API.
>>>
>>> That said, unless this issue can be resolved, IMO, all the atomic headers
>>> should only be installed/pre-installed, if all ops and headers are
>>> implemented for a specific target - ATM, this does not apply.
>>>
>>> Ralf
>>>
>>>
>>>
>>> _______________________________________________
>>> rtems-devel mailing list
>>> rtems-devel at rtems.org
>>> http://www.rtems.org/mailman/listinfo/rtems-devel
>>
>>
>>
>> --
>> Wei Yang
>> Best Regards
>>
>> wei.a.yang at gmail.com
>> _______________________________________________
>> rtems-devel mailing list
>> rtems-devel at rtems.org
>> http://www.rtems.org/mailman/listinfo/rtems-devel



-- 
Wei Yang
Best Regards

wei.a.yang at gmail.com



More information about the devel mailing list