summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-02 14:52:12 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-02 15:33:01 +0200
commit83ca9f0a77dff9eee3ca3046430ceeba7cc323f2 (patch)
tree2b539ceeff5a10df21a62592d9739c41135df695 /cpukit/rtems
parentscore: Remove CPU_PARTITION_ALIGNMENT (diff)
downloadrtems-83ca9f0a77dff9eee3ca3046430ceeba7cc323f2.tar.bz2
rtems: Relax partition buffer area alignment
The partition buffer area alignment required by rtems_partition_create() was too strict since it was checked via _Addresses_Is_aligned() which uses CPU_ALIGNMENT. The CPU_ALIGNMENT must take long double and vector data type alignment requirements into account. For the partition maintenance only pointer alignment is required (Chain_Node, which consists of two pointers). The user should ensure that its partition buffer area is suitable for the items it wants to manage. The user should not be burdened to provide buffers with the maximum architecture alignment, e.g. why need a 16 byte aligned buffer if you want to manage items with 4 byte integers only? Update #3482.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r--cpukit/rtems/src/partcreate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c
index 2facb42e3a..2134b99e19 100644
--- a/cpukit/rtems/src/partcreate.c
+++ b/cpukit/rtems/src/partcreate.c
@@ -79,8 +79,8 @@ rtems_status_code rtems_partition_create(
if ( buffer_size < sizeof( Chain_Node ) )
return RTEMS_INVALID_SIZE;
- if ( !_Addresses_Is_aligned( starting_address ) )
- return RTEMS_INVALID_ADDRESS;
+ if ( !_Partition_Is_buffer_area_aligned( starting_address ) )
+ return RTEMS_INVALID_ADDRESS;
#if defined(RTEMS_MULTIPROCESSING)
if ( _Attributes_Is_global( attribute_set ) &&