[PATCH 09/20] rtems: Remove _Partition_Destroy()

Gedare Bloom gedare at rtems.org
Fri Nov 20 16:06:45 UTC 2020


On Fri, Nov 20, 2020 at 4:15 AM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> It was a trivial function call wrapper used only in one place.
> ---
>  cpukit/include/rtems/rtems/partimpl.h | 7 -------
>  cpukit/rtems/src/partdelete.c         | 2 +-
>  2 files changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/cpukit/include/rtems/rtems/partimpl.h b/cpukit/include/rtems/rtems/partimpl.h
> index 55de7b113d..fc17311803 100644
> --- a/cpukit/include/rtems/rtems/partimpl.h
> +++ b/cpukit/include/rtems/rtems/partimpl.h
> @@ -129,13 +129,6 @@ RTEMS_INLINE_ROUTINE void _Partition_Initialize(
>    _ISR_lock_Initialize( &the_partition->Lock, "Partition" );
>  }
>
> -RTEMS_INLINE_ROUTINE void _Partition_Destroy(
> -  Partition_Control *the_partition
> -)
> -{
> -  _ISR_lock_Destroy( &the_partition->Lock );
> -}
> -

OK. This "Destroy" is shallow anyway, so probably not well-named in
the first place.

>  /**
>   * @brief Calls _Objects_Get() using the ::_Partition_Information.
>   *
> diff --git a/cpukit/rtems/src/partdelete.c b/cpukit/rtems/src/partdelete.c
> index 4fc71aff2d..f0d04f94a0 100644
> --- a/cpukit/rtems/src/partdelete.c
> +++ b/cpukit/rtems/src/partdelete.c
> @@ -72,7 +72,7 @@ rtems_status_code rtems_partition_delete(
>    }10000
>  #endif
>
> -  _Partition_Destroy( the_partition );
> +  _ISR_lock_Destroy( &the_partition->Lock );
>    _Objects_Free( &_Partition_Information, &the_partition->Object );
>    _Objects_Allocator_unlock();
>    return RTEMS_SUCCESSFUL;
> --
> 2.26.2
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list