Changeset 27bbc05 in rtems for cpukit/rtems/src/partcreate.c


Ignore:
Timestamp:
Aug 2, 2018, 12:49:01 PM (17 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
83ca9f0a
Parents:
141d502
git-author:
Sebastian Huber <sebastian.huber@…> (08/02/18 12:49:01)
git-committer:
Sebastian Huber <sebastian.huber@…> (08/02/18 13:33:00)
Message:

score: Remove CPU_PARTITION_ALIGNMENT

Use the CPU_SIZEOF_POINTER alignment instead. The internal alignment
requirement is defined by the use of Chain_Node (consisting of two
pointers) to manage the free chain of partitions.

It seems that previously the condition

CPU_PARTITION_ALIGNMENT >= sizeof(Chain_Node)

was true on all CPU ports. Now, we need an additional check.

Update #3482.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/partcreate.c

    r141d502 r27bbc05  
    6565    return RTEMS_INVALID_ADDRESS;
    6666
    67   if ( length == 0 || buffer_size == 0 || length < buffer_size ||
    68          !_Partition_Is_buffer_size_aligned( buffer_size ) )
     67  if ( length == 0 )
     68    return RTEMS_INVALID_SIZE;
     69
     70  if ( buffer_size == 0 )
     71    return RTEMS_INVALID_SIZE;
     72
     73  if ( length < buffer_size )
     74    return RTEMS_INVALID_SIZE;
     75
     76  if ( !_Partition_Is_buffer_size_aligned( buffer_size ) )
     77    return RTEMS_INVALID_SIZE;
     78
     79  if ( buffer_size < sizeof( Chain_Node ) )
    6980    return RTEMS_INVALID_SIZE;
    7081
Note: See TracChangeset for help on using the changeset viewer.