[rtems commit] posix: Remove unused _POSIX_Get_object_body()

Sebastian Huber sebh at rtems.org
Tue Feb 12 12:56:20 UTC 2019


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Feb 12 13:18:56 2019 +0100

posix: Remove unused _POSIX_Get_object_body()

---

 cpukit/include/rtems/posix/posixapi.h | 41 -----------------------------------
 1 file changed, 41 deletions(-)

diff --git a/cpukit/include/rtems/posix/posixapi.h b/cpukit/include/rtems/posix/posixapi.h
index 29394ab..8c1eb81 100644
--- a/cpukit/include/rtems/posix/posixapi.h
+++ b/cpukit/include/rtems/posix/posixapi.h
@@ -22,7 +22,6 @@
 #include <rtems/config.h>
 #include <rtems/score/assert.h>
 #include <rtems/score/objectimpl.h>
-#include <rtems/score/onceimpl.h>
 #include <rtems/score/threadimpl.h>
 #include <rtems/seterr.h>
 
@@ -87,46 +86,6 @@ RTEMS_INLINE_ROUTINE int _POSIX_Zero_or_minus_one_plus_errno(
   rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) );
 }
 
-/**
- * @brief Macro to generate a function body to get a POSIX object by
- * identifier.
- *
- * Generates a function body to get the object for the specified identifier.
- * Performs automatic initialization if requested and necessary.  This is an
- * ugly macro, since C lacks support for templates.
- */
-#define _POSIX_Get_object_body( \
-  type, \
-  id, \
-  queue_context, \
-  info, \
-  initializer, \
-  init \
-) \
-  Objects_Control *the_object; \
-  if ( id == NULL ) { \
-    return NULL; \
-  } \
-  _Thread_queue_Context_initialize( queue_context ); \
-  the_object = _Objects_Get( \
-    (Objects_Id) *id, \
-    &queue_context->Lock_context.Lock_context, \
-    info \
-  ); \
-  if ( the_object == NULL ) { \
-    _Once_Lock(); \
-    if ( *id == initializer ) { \
-      init( id, NULL ); \
-    } \
-    _Once_Unlock(); \
-    the_object = _Objects_Get( \
-      (Objects_Id) *id, \
-      &queue_context->Lock_context.Lock_context, \
-      info \
-    ); \
-  } \
-  return (type *) the_object
-
 /*
  * See also The Open Group Base Specifications Issue 7, IEEE Std 1003.1-2008,
  * 2016 Edition, subsection 2.9.9, Synchronization Object Copies and




More information about the vc mailing list