[rtems commit] objectdata.h, objectimpl.h: Change structure member from free to deallocate

Sebastian Huber sebh at rtems.org
Fri Feb 14 06:30:57 UTC 2020


Module:    rtems
Branch:    master
Commit:    3f732f0c4db358a9897c533f93cb9ff94ef5c0f3
Changeset: http://git.rtems.org/rtems/commit/?id=3f732f0c4db358a9897c533f93cb9ff94ef5c0f3

Author:    Joel Sherrill <joel at rtems.org>
Date:      Wed Feb 12 18:15:56 2020 -0600

objectdata.h, objectimpl.h: Change structure member from free to deallocate

Without this change, rtems-libbsd does not compile. A macro turns
free into bsd_free.

Also the use of a standard library element as a program identifier
is a violation of a MISRA rule. Turns out that was a good rule. :)

---

 cpukit/include/rtems/score/objectdata.h | 2 +-
 cpukit/include/rtems/score/objectimpl.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cpukit/include/rtems/score/objectdata.h b/cpukit/include/rtems/score/objectdata.h
index 3d1a79c..56a1b8e 100644
--- a/cpukit/include/rtems/score/objectdata.h
+++ b/cpukit/include/rtems/score/objectdata.h
@@ -210,7 +210,7 @@ struct Objects_Information {
    *
    * @see _Objects_Free_static(), and _Objects_Free_unlimited().
    */
-  void ( *free )( Objects_Information *, Objects_Control * );
+  void ( *deallocate )( Objects_Information *, Objects_Control * );
 
   /**
    * @brief This is the number of object control blocks on the inactive chain.
diff --git a/cpukit/include/rtems/score/objectimpl.h b/cpukit/include/rtems/score/objectimpl.h
index 5ade0ed..c540f90 100644
--- a/cpukit/include/rtems/score/objectimpl.h
+++ b/cpukit/include/rtems/score/objectimpl.h
@@ -933,8 +933,8 @@ RTEMS_INLINE_ROUTINE void _Objects_Free(
 )
 {
   _Assert( _Objects_Allocator_is_owner() );
-  _Assert( information->free != NULL );
-  ( *information->free )( information, the_object );
+  _Assert( information->deallocate != NULL );
+  ( *information->deallocate )( information, the_object );
 }
 
 /**



More information about the vc mailing list