diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-10-14 10:29:19 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-11-24 07:40:11 +0100 |
commit | 1eafefbf4c42cc83c2167722774955071eaea099 (patch) | |
tree | e488e5e8694a6d1e634245e40bf4e0a69a2b0f32 /cpukit/rtems/src/partcreate.c | |
parent | rtems: Move _Partition_Is_buffer_on_boundary() (diff) | |
download | rtems-1eafefbf4c42cc83c2167722774955071eaea099.tar.bz2 |
rtems: Move _Partition_Is_buffer_size_aligned()
It is only used by rtems_partition_create(). Move code directly into
the directive which called the inline function. Add a comment.
Diffstat (limited to 'cpukit/rtems/src/partcreate.c')
-rw-r--r-- | cpukit/rtems/src/partcreate.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c index 9d4c7df283..1e471d3c0a 100644 --- a/cpukit/rtems/src/partcreate.c +++ b/cpukit/rtems/src/partcreate.c @@ -58,8 +58,13 @@ rtems_status_code rtems_partition_create( if ( length < buffer_size ) return RTEMS_INVALID_SIZE; - if ( !_Partition_Is_buffer_size_aligned( buffer_size ) ) + /* + * Ensure that the buffer size is an integral multiple of the pointer size so + * that each buffer begin meets the chain node alignment. + */ + if ( buffer_size % CPU_SIZEOF_POINTER != 0 ) { return RTEMS_INVALID_SIZE; + } if ( buffer_size < sizeof( Chain_Node ) ) return RTEMS_INVALID_SIZE; |