[PATCH 13/20] rtems: Move _Partition_Is_buffer_area_aligned()

Joel Sherrill joel at rtems.org
Fri Nov 20 13:31:53 UTC 2020


Wasn't there Doxygen above it?

Needs comments

On Fri, Nov 20, 2020, 5:16 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> It is only used by rtems_partition_create().
> ---
>  cpukit/include/rtems/rtems/partimpl.h | 7 -------
>  cpukit/rtems/src/partcreate.c         | 5 +++++
>  2 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/cpukit/include/rtems/rtems/partimpl.h
> b/cpukit/include/rtems/rtems/partimpl.h
> index b9d57ae3c3..dcffe757c7 100644
> --- a/cpukit/include/rtems/rtems/partimpl.h
> +++ b/cpukit/include/rtems/rtems/partimpl.h
> @@ -34,13 +34,6 @@ extern "C" {
>   * @{
>   */
>
> -RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_area_aligned(
> -  const void *starting_address
> -)
> -{
> -  return (((uintptr_t) starting_address) % CPU_SIZEOF_POINTER) == 0;
> -}
> -
>  /**
>   *  @brief Allocates a partition control block from the
>   *  inactive chain of free partition control blocks.
> diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c
> index 6673ce2c59..da791e2360 100644
> --- a/cpukit/rtems/src/partcreate.c
> +++ b/cpukit/rtems/src/partcreate.c
> @@ -31,6 +31,11 @@ static bool _Partition_Is_buffer_size_aligned( size_t
> buffer_size )
>    return ( buffer_size % CPU_SIZEOF_POINTER ) == 0;
>  }
>
> +static bool _Partition_Is_buffer_area_aligned( const void
> *starting_address )
> +{
> +  return ( ( (uintptr_t) starting_address ) % CPU_SIZEOF_POINTER ) == 0;
> +}
> +
>  rtems_status_code rtems_partition_create(
>    rtems_name       name,
>    void            *starting_address,
> --
> 2.26.2
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20201120/71fda1c9/attachment.html>


More information about the devel mailing list