Changeset 1fe1b820 in rtems for testsuites


Ignore:
Timestamp:
Sep 10, 2018, 9:47:24 AM (14 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
aaa6653
Parents:
e58f1cd3
git-author:
Sebastian Huber <sebastian.huber@…> (09/10/18 09:47:24)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/10/18 10:01:50)
Message:

score: Fix PER_CPU_DATA_GET_BY_OFFSET()

Add uniprocessor version for PER_CPU_DATA_GET_BY_OFFSET(). Fix warnings
in uniprocessor configurations.

Update #3507.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/sppercpudata01/init.c

    re58f1cd3 r1fe1b820  
    7575    unsigned int *i;
    7676    unsigned long *l;
     77    uintptr_t off;
    7778    t *pt;
    7879
    7980    set_affinity(cpu_index);
    8081    cpu = _Per_CPU_Get_by_index(cpu_index);
     82
     83    off = PER_CPU_DATA_OFFSET(c);
     84    c = PER_CPU_DATA_GET_BY_OFFSET(cpu, unsigned char, off);
     85    rtems_test_assert(*c == 1);
    8186
    8287    c = PER_CPU_DATA_GET(cpu, unsigned char, c);
     
    198203    unsigned int *i;
    199204    unsigned long *l;
     205    uintptr_t off;
    200206    t *pt;
    201207
     
    205211    c = PER_CPU_DATA_GET(cpu, unsigned char, c);
    206212    ++v;
     213    rtems_test_assert(*c == (unsigned char) v);
     214
     215    off = PER_CPU_DATA_OFFSET(c);
     216    c = PER_CPU_DATA_GET_BY_OFFSET(cpu, unsigned char, off);
    207217    rtems_test_assert(*c == (unsigned char) v);
    208218
Note: See TracChangeset for help on using the changeset viewer.