Changeset 97e9728 in rtems


Ignore:
Timestamp:
Sep 30, 2020, 12:21:32 PM (2 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
0c74ff9
Parents:
94b8d85b
git-author:
Sebastian Huber <sebastian.huber@…> (09/30/20 12:21:32)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/07/20 06:10:52)
Message:

rtems: Add RTEMS_PARTITION_ALIGNMENT

Update #4105.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/rtems/part.h

    r94b8d85b r97e9728  
    3535 */
    3636/**@{*/
     37
     38/**
     39 * @brief This constant defines the minimum alignment of a partition buffer in
     40 *   bytes.
     41 *
     42 * Use it with RTEMS_ALIGNED() to define the alignment of partition buffer
     43 * types or statically allocated partition buffer areas.
     44 */
     45#define RTEMS_PARTITION_ALIGNMENT CPU_SIZEOF_POINTER
    3746
    3847/**
  • testsuites/psxtests/psxconfig01/init.c

    r94b8d85b r97e9728  
    187187#include <rtems/confdefs.h>
    188188
    189 typedef struct {
     189typedef struct RTEMS_ALIGNED(RTEMS_PARTITION_ALIGNMENT) {
    190190  uint64_t data [16];
    191191} area;
  • testsuites/sptests/sppartition_err01/init.c

    r94b8d85b r97e9728  
    1717const char rtems_test_name[] = "SPPARTITION_ERR 1";
    1818
    19 uint32_t Other_Memory;
    20 
    21 TEST_EXTERN rtems_name Partition_name[ 2 ]; /* array of partition names */
    22 TEST_EXTERN rtems_id   Partition_id[ 2 ];   /* array of partition ids */
    23 
    24 TEST_EXTERN uint8_t   Partition_good_area[256] CPU_STRUCTURE_ALIGNMENT;
     19static uint32_t Other_Memory;
     20
     21static rtems_name Partition_name[ 2 ]; /* array of partition names */
     22
     23static rtems_id   Partition_id[ 2 ];   /* array of partition ids */
     24
     25static RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) uint8_t
     26  Partition_good_area[ 256 ];
     27
    2528#define Partition_bad_area (void *) 0x00000005
    2629
    27 void test_partition_errors(void);
    28 
    29 void test_partition_errors(void)
     30static void test_partition_errors(void)
    3031{
    3132  void              *buffer_address_1;
     
    153154    Partition_good_area,
    154155    128,
    155     35,
     156    RTEMS_PARTITION_ALIGNMENT - 1,
    156157    RTEMS_DEFAULT_ATTRIBUTES,
    157158    &junk_id
Note: See TracChangeset for help on using the changeset viewer.