summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/partcreate.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-10-14 10:30:45 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-11-24 07:40:16 +0100
commit1784799b1717a7e9e3167e09c7492d654cb20351 (patch)
treebf420b3bbca07a2e1448776a62243c427f8a70ef /cpukit/rtems/src/partcreate.c
parentrtems: Move _Partition_Is_buffer_size_aligned() (diff)
downloadrtems-1784799b1717a7e9e3167e09c7492d654cb20351.tar.bz2
rtems: Move _Partition_Is_buffer_area_aligned()
It is only used by rtems_partition_create(). Move code directly into directive which called the inline function. Add a comment.
Diffstat (limited to 'cpukit/rtems/src/partcreate.c')
-rw-r--r--cpukit/rtems/src/partcreate.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c
index 1e471d3c0a..743405439c 100644
--- a/cpukit/rtems/src/partcreate.c
+++ b/cpukit/rtems/src/partcreate.c
@@ -69,8 +69,13 @@ rtems_status_code rtems_partition_create(
if ( buffer_size < sizeof( Chain_Node ) )
return RTEMS_INVALID_SIZE;
- if ( !_Partition_Is_buffer_area_aligned( starting_address ) )
+ /*
+ * Ensure that the buffer area starting address is aligned on a pointer
+ * boundary so that each buffer begin meets the chain node alignment.
+ */
+ if ( (uintptr_t) starting_address % CPU_SIZEOF_POINTER != 0 ) {
return RTEMS_INVALID_ADDRESS;
+ }
#if defined(RTEMS_MULTIPROCESSING)
if ( !_System_state_Is_multiprocessing ) {