[rtems commit] rtems: Add _RTEMS_Name_to_id()

Sebastian Huber sebh at rtems.org
Mon Aug 31 14:21:33 UTC 2020


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Jun 24 13:54:23 2020 +0200

rtems: Add _RTEMS_Name_to_id()

Simplify object name to identifier directives.  Using
_RTEMS_Name_to_id() to implement the directives enables a tail call
optimization.

Change license to BSD-2-Clause according to file history.

Update #3053.

---

 cpukit/Makefile.am                        |  1 +
 cpukit/headers.am                         |  1 +
 cpukit/include/rtems/rtems/objectimpl.h   | 82 +++++++++++++++++++++++++++++++
 cpukit/include/rtems/score/objectimpl.h   | 23 +++++----
 cpukit/rtems/src/barrierident.c           | 55 ++++++++++++---------
 cpukit/rtems/src/dpmemident.c             | 51 ++++++++++++-------
 cpukit/rtems/src/msgqident.c              | 57 +++++++++++----------
 cpukit/rtems/src/partident.c              | 47 +++++++++++-------
 cpukit/rtems/src/ratemonident.c           | 56 ++++++++++++---------
 cpukit/rtems/src/regionident.c            | 57 ++++++++++++---------
 cpukit/rtems/src/rtemsnametoid.c          | 55 +++++++++++++++++++++
 cpukit/rtems/src/semident.c               | 44 +++++++++++------
 cpukit/rtems/src/taskident.c              | 65 ++++++++++++++----------
 cpukit/rtems/src/timerident.c             | 56 ++++++++++++---------
 cpukit/sapi/src/extensionident.c          | 52 ++++++++++++--------
 cpukit/score/src/objectnametoid.c         |  4 +-
 testsuites/sptests/spsimplesched02/init.c |  4 +-
 17 files changed, 480 insertions(+), 230 deletions(-)

diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index aa1fe5f..1ea3def 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -745,6 +745,7 @@ librtemscpu_a_SOURCES += rtems/src/regionreturnsegment.c
 librtemscpu_a_SOURCES += rtems/src/rtemsbuildid.c
 librtemscpu_a_SOURCES += rtems/src/rtemsbuildname.c
 librtemscpu_a_SOURCES += rtems/src/rtemsmaxprio.c
+librtemscpu_a_SOURCES += rtems/src/rtemsnametoid.c
 librtemscpu_a_SOURCES += rtems/src/rtemsobjectapimaximumclass.c
 librtemscpu_a_SOURCES += rtems/src/rtemsobjectapiminimumclass.c
 librtemscpu_a_SOURCES += rtems/src/rtemsobjectgetapiclassname.c
diff --git a/cpukit/headers.am b/cpukit/headers.am
index c9aa181..e1d450a 100644
--- a/cpukit/headers.am
+++ b/cpukit/headers.am
@@ -276,6 +276,7 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/modesimpl.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/mp.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/msgmp.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/object.h
+include_rtems_rtems_HEADERS += include/rtems/rtems/objectimpl.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/options.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/optionsimpl.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/part.h
diff --git a/cpukit/include/rtems/rtems/objectimpl.h b/cpukit/include/rtems/rtems/objectimpl.h
new file mode 100644
index 0000000..08a9749
--- /dev/null
+++ b/cpukit/include/rtems/rtems/objectimpl.h
@@ -0,0 +1,82 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ClassicObjectImpl
+ *
+ * @brief Implementation Interfaces for Classic Objects
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _RTEMS_RTEMS_OBJECTIMPL_H
+#define _RTEMS_RTEMS_OBJECTIMPL_H
+
+#include <rtems/score/objectimpl.h>
+#include <rtems/rtems/status.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup ClassicObjectImpl Classic Object Implementation
+ *
+ * @ingroup RTEMSInternalClassic
+ *
+ * @{
+ */
+
+/**
+ * @brief Calls _Objects_Name_to_id_u32() and converts the status.
+ *
+ * @param name is the name of the object to find.
+ * @param node is the set of nodes to search.
+ * @param[out] id is the pointer to an object identifier variable or NULL.  The
+ *   object identifier will be stored in the referenced variable, if the
+ *   operation was successful.
+ * @param information is the pointer to an object class information block.
+ *
+ * @retval RTEMS_SUCCESSFUL The operations was successful.
+ * @retval RTEMS_INVALID_ADDRESS The id parameter was NULL.
+ * @retval RTEMS_INVALID_NAME No object exists with the specified name on the
+ *   specified node set.
+ */
+rtems_status_code _RTEMS_Name_to_id(
+  uint32_t                   name,
+  uint32_t                   node,
+  Objects_Id                *id,
+  const Objects_Information *information
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTEMS_RTEMS_OBJECTIMPL_H */
diff --git a/cpukit/include/rtems/score/objectimpl.h b/cpukit/include/rtems/score/objectimpl.h
index a8c7fcb..3238759 100644
--- a/cpukit/include/rtems/score/objectimpl.h
+++ b/cpukit/include/rtems/score/objectimpl.h
@@ -221,26 +221,29 @@ typedef enum {
 #define OBJECTS_NAME_ERRORS_LAST  OBJECTS_INVALID_NODE
 
 /**
- * @brief Converts an object name to an Id.
+ * @brief Searches an object of the specified class with the specified name on
+ *   the specified set of nodes.
  *
- * This method converts an object name to an Id.  It performs a look up
+ * This method converts an object name to an identifier.  It performs a look up
  * using the object information block for this object class.
  *
- * @param information points to an object class information block.
  * @param name is the name of the object to find.
  * @param node is the set of nodes to search.
- * @param[out] id will contain the Id if the search is successful.
+ * @param[out] id is the pointer to an object identifier variable or NULL.  The
+ *   object identifier will be stored in the referenced variable, if the
+ *   operation was successful.
+ * @param information is the pointer to an object class information block.
  *
- * @retval OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL The operations was successful
- *      @a id contains the ID.
- * @retval OBJECTS_INVALID_NAME The name was invalid.
- * @retval OBJECTS_INVALID_ID The id is not 0 before the operation.
+ * @retval OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL The operations was successful.
+ * @retval OBJECTS_INVALID_ADDRESS The id parameter was NULL.
+ * @retval OBJECTS_INVALID_NAME No object exists with the specified name on the
+ *   specified node set.
  */
 Objects_Name_or_id_lookup_errors _Objects_Name_to_id_u32(
-  const Objects_Information *information,
   uint32_t                   name,
   uint32_t                   node,
-  Objects_Id                *id
+  Objects_Id                *id,
+  const Objects_Information *information
 );
 
 typedef enum {
diff --git a/cpukit/rtems/src/barrierident.c b/cpukit/rtems/src/barrierident.c
index e3d6a84..928cc0c 100644
--- a/cpukit/rtems/src/barrierident.c
+++ b/cpukit/rtems/src/barrierident.c
@@ -1,41 +1,52 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
- *  @file
+ * @file
+ *
+ * @ingroup ClassicBarrierImpl
  *
- *  @brief RTEMS Barrier name to Id
- *  @ingroup ClassicBarrier
+ * @brief rtems_barrier_ident() Implementation
  */
 
 /*
- *  COPYRIGHT (c) 1989-2006.
- *  On-Line Applications Research Corporation (OAR).
+ * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 1989 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
  *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <rtems/rtems/statusimpl.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/options.h>
 #include <rtems/rtems/barrierimpl.h>
+#include <rtems/rtems/objectimpl.h>
 
-rtems_status_code rtems_barrier_ident(
-  rtems_name  name,
-  rtems_id   *id
-)
+rtems_status_code rtems_barrier_ident( rtems_name name, rtems_id *id )
 {
-  Objects_Name_or_id_lookup_errors  status;
-
-  status = _Objects_Name_to_id_u32(
-    &_Barrier_Information,
+  return _RTEMS_Name_to_id(
     name,
     OBJECTS_SEARCH_LOCAL_NODE,
-    id
+    id,
+    &_Barrier_Information
   );
-
-  return _Status_Object_name_errors_to_status[ status ];
 }
diff --git a/cpukit/rtems/src/dpmemident.c b/cpukit/rtems/src/dpmemident.c
index 775d833..38d9068 100644
--- a/cpukit/rtems/src/dpmemident.c
+++ b/cpukit/rtems/src/dpmemident.c
@@ -1,42 +1,55 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
- *  @file
+ * @file
+ *
+ * @ingroup ClassicDPMEMImpl
  *
- *  @brief RTEMS Port Name to Id
- *  @ingroup ClassicDPMEM
+ * @brief rtems_port_ident() Implementation
  */
 
 /*
- *  COPYRIGHT (c) 1989-1999.
- *  On-Line Applications Research Corporation (OAR).
+ * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 1989 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
  *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <rtems/rtems/statusimpl.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/address.h>
 #include <rtems/rtems/dpmemimpl.h>
-#include <rtems/score/thread.h>
+#include <rtems/rtems/objectimpl.h>
 
 rtems_status_code rtems_port_ident(
   rtems_name  name,
   rtems_id   *id
 )
 {
-  Objects_Name_or_id_lookup_errors  status;
-
-  status = _Objects_Name_to_id_u32(
-    &_Dual_ported_memory_Information,
+  return _RTEMS_Name_to_id(
     name,
     OBJECTS_SEARCH_ALL_NODES,
-    id
+    id,
+    &_Dual_ported_memory_Information
   );
-
-  return _Status_Object_name_errors_to_status[ status ];
 }
diff --git a/cpukit/rtems/src/msgqident.c b/cpukit/rtems/src/msgqident.c
index f25f0cd..dfd68d2 100644
--- a/cpukit/rtems/src/msgqident.c
+++ b/cpukit/rtems/src/msgqident.c
@@ -1,33 +1,45 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
- *  @file
+ * @file
+ *
+ * @ingroup ClassicMessageQueueImpl
  *
- *  @brief RTEMS Message Queue Name to Id
- *  @ingroup ClassicMessageQueue
+ * @brief rtems_message_queue_ident() Implementation
  */
 
 /*
- *  COPYRIGHT (c) 1989-1999.
- *  On-Line Applications Research Corporation (OAR).
+ * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 1989 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
  *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremsgimpl.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/rtems/statusimpl.h>
-#include <rtems/rtems/attrimpl.h>
 #include <rtems/rtems/messageimpl.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/support.h>
+#include <rtems/rtems/objectimpl.h>
 
 rtems_status_code rtems_message_queue_ident(
   rtems_name  name,
@@ -35,14 +47,5 @@ rtems_status_code rtems_message_queue_ident(
   rtems_id   *id
 )
 {
-  Objects_Name_or_id_lookup_errors  status;
-
-  status = _Objects_Name_to_id_u32(
-    &_Message_queue_Information,
-    name,
-    node,
-    id
-  );
-
-  return _Status_Object_name_errors_to_status[ status ];
+  return _RTEMS_Name_to_id( name, node, id, &_Message_queue_Information );
 }
diff --git a/cpukit/rtems/src/partident.c b/cpukit/rtems/src/partident.c
index 03490cd..5e7140f 100644
--- a/cpukit/rtems/src/partident.c
+++ b/cpukit/rtems/src/partident.c
@@ -1,28 +1,45 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
- *  @file
+ * @file
+ *
+ * @ingroup ClassicPartitionImpl
  *
- *  @brief RTEMS Partition Name to Id
- *  @ingroup ClassicPart
+ * @brief rtems_partition_ident() Implementation
  */
 
 /*
- *  COPYRIGHT (c) 1989-1999.
- *  On-Line Applications Research Corporation (OAR).
+ * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 1989 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
  *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <rtems/rtems/statusimpl.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/address.h>
 #include <rtems/rtems/partimpl.h>
-#include <rtems/score/thread.h>
+#include <rtems/rtems/objectimpl.h>
 
 rtems_status_code rtems_partition_ident(
   rtems_name  name,
@@ -30,9 +47,5 @@ rtems_status_code rtems_partition_ident(
   rtems_id   *id
 )
 {
-  Objects_Name_or_id_lookup_errors  status;
-
-  status = _Objects_Name_to_id_u32( &_Partition_Information, name, node, id );
-
-  return _Status_Object_name_errors_to_status[ status ];
+  return _RTEMS_Name_to_id( name, node, id, &_Partition_Information );
 }
diff --git a/cpukit/rtems/src/ratemonident.c b/cpukit/rtems/src/ratemonident.c
index 9c1ae3f..67ba13b 100644
--- a/cpukit/rtems/src/ratemonident.c
+++ b/cpukit/rtems/src/ratemonident.c
@@ -1,42 +1,52 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
- *  @file
+ * @file
+ *
+ * @ingroup ClassicRateMonImpl
  *
- *  @brief RTEMS Rate Monotonic Name to Id
- *  @ingroup ClassicRateMon
+ * @brief rtems_rate_monotonic_ident() Implementation
  */
 
 /*
- *  COPYRIGHT (c) 1989-2007.
- *  On-Line Applications Research Corporation (OAR).
+ * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 1989 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
  *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <rtems/rtems/statusimpl.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/isr.h>
 #include <rtems/rtems/ratemonimpl.h>
-#include <rtems/score/thread.h>
+#include <rtems/rtems/objectimpl.h>
 
-rtems_status_code rtems_rate_monotonic_ident(
-  rtems_name  name,
-  rtems_id   *id
-)
+rtems_status_code rtems_rate_monotonic_ident( rtems_name name, rtems_id *id )
 {
-  Objects_Name_or_id_lookup_errors  status;
-
-  status = _Objects_Name_to_id_u32(
-    &_Rate_monotonic_Information,
+  return _RTEMS_Name_to_id(
     name,
     OBJECTS_SEARCH_LOCAL_NODE,
-    id
+    id,
+    &_Rate_monotonic_Information
   );
-
-  return _Status_Object_name_errors_to_status[ status ];
 }
diff --git a/cpukit/rtems/src/regionident.c b/cpukit/rtems/src/regionident.c
index 9e4d4b7..c8a643c 100644
--- a/cpukit/rtems/src/regionident.c
+++ b/cpukit/rtems/src/regionident.c
@@ -1,43 +1,52 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
- *  @file
+ * @file
+ *
+ * @ingroup ClassicRegionImpl
  *
- *  @brief RTEMS Region Name to Id
- *  @ingroup ClassicRegion
+ * @brief rtems_region_ident() Implementation
  */
 
 /*
- *  COPYRIGHT (c) 1989-1999.
- *  On-Line Applications Research Corporation (OAR).
+ * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 1989 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
  *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <rtems/rtems/statusimpl.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/options.h>
 #include <rtems/rtems/regionimpl.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/apimutex.h>
+#include <rtems/rtems/objectimpl.h>
 
-rtems_status_code rtems_region_ident(
-  rtems_name  name,
-  rtems_id   *id
-)
+rtems_status_code rtems_region_ident( rtems_name name, rtems_id *id )
 {
-  Objects_Name_or_id_lookup_errors  status;
-
-  status = _Objects_Name_to_id_u32(
-    &_Region_Information,
+  return _RTEMS_Name_to_id(
     name,
     OBJECTS_SEARCH_LOCAL_NODE,
-    id
+    id,
+    &_Region_Information
   );
-
-  return _Status_Object_name_errors_to_status[ status ];
 }
diff --git a/cpukit/rtems/src/rtemsnametoid.c b/cpukit/rtems/src/rtemsnametoid.c
new file mode 100644
index 0000000..43a6d20
--- /dev/null
+++ b/cpukit/rtems/src/rtemsnametoid.c
@@ -0,0 +1,55 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ClassicObjectImpl
+ *
+ * @brief _RTEMS_Name_to_id() Implementation
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/rtems/objectimpl.h>
+#include <rtems/rtems/statusimpl.h>
+
+rtems_status_code _RTEMS_Name_to_id(
+  uint32_t                   name,
+  uint32_t                   node,
+  Objects_Id                *id,
+  const Objects_Information *information
+)
+{
+  Objects_Name_or_id_lookup_errors status;
+
+  status = _Objects_Name_to_id_u32( name, node, id, information );
+
+  return _Status_Object_name_errors_to_status[ status ];
+}
diff --git a/cpukit/rtems/src/semident.c b/cpukit/rtems/src/semident.c
index 37c776c..93c325c 100644
--- a/cpukit/rtems/src/semident.c
+++ b/cpukit/rtems/src/semident.c
@@ -1,17 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
- *  @file
+ * @file
+ *
+ * @ingroup ClassicSemImpl
  *
- *  @brief RTEMS Semaphore Name to Id
- *  @ingroup ClassicSem
+ * @brief rtems_semaphore_ident() Implementation
  */
 
 /*
- *  COPYRIGHT (c) 1989-1999.
- *  On-Line Applications Research Corporation (OAR).
+ * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 1989 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
  *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -19,7 +39,7 @@
 #endif
 
 #include <rtems/rtems/semimpl.h>
-#include <rtems/rtems/statusimpl.h>
+#include <rtems/rtems/objectimpl.h>
 
 rtems_status_code rtems_semaphore_ident(
   rtems_name  name,
@@ -27,9 +47,5 @@ rtems_status_code rtems_semaphore_ident(
   rtems_id   *id
 )
 {
-  Objects_Name_or_id_lookup_errors  status;
-
-  status = _Objects_Name_to_id_u32( &_Semaphore_Information, name, node, id );
-
-  return _Status_Object_name_errors_to_status[ status ];
+  return _RTEMS_Name_to_id( name, node, id, &_Semaphore_Information );
 }
diff --git a/cpukit/rtems/src/taskident.c b/cpukit/rtems/src/taskident.c
index d35a617..501bd0b 100644
--- a/cpukit/rtems/src/taskident.c
+++ b/cpukit/rtems/src/taskident.c
@@ -1,53 +1,66 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
- *  @file
+ * @file
+ *
+ * @ingroup ClassicTasksImpl
  *
- *  @brief RTEMS Task Name to Id
- *  @ingroup ClassicTasks
+ * @brief rtems_task_ident() Implementation
  */
 
 /*
- *  COPYRIGHT (c) 1989-1999.
- *  On-Line Applications Research Corporation (OAR).
+ * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 1989 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
  *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <rtems/rtems/statusimpl.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/stack.h>
 #include <rtems/rtems/tasksimpl.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
+#include <rtems/rtems/objectimpl.h>
+#include <rtems/score/percpu.h>
 
 rtems_status_code rtems_task_ident(
-  rtems_name    name,
-  uint32_t      node,
-  rtems_id     *id
+  rtems_name  name,
+  uint32_t    node,
+  rtems_id   *id
 )
 {
-  Objects_Name_or_id_lookup_errors  status;
-
-  if ( !id )
+  if ( id == NULL ) {
     return RTEMS_INVALID_ADDRESS;
+  }
 
   if ( name == OBJECTS_ID_OF_SELF ) {
     *id = _Thread_Get_executing()->Object.id;
     return RTEMS_SUCCESSFUL;
-   }
+  }
 
-  status = _Objects_Name_to_id_u32(
-    &_RTEMS_tasks_Information.Objects,
+  return _RTEMS_Name_to_id(
     name,
     node,
-    id
+    id,
+    &_RTEMS_tasks_Information.Objects
   );
-
-  return _Status_Object_name_errors_to_status[ status ];
 }
diff --git a/cpukit/rtems/src/timerident.c b/cpukit/rtems/src/timerident.c
index b11550a..8259507 100644
--- a/cpukit/rtems/src/timerident.c
+++ b/cpukit/rtems/src/timerident.c
@@ -1,42 +1,52 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
- *  @file
+ * @file
+ *
+ * @ingroup ClassicTimerImpl
  *
- *  @brief RTEMS Timer Name to Id
- *  @ingroup ClassicTimer
+ * @brief rtems_timer_ident() Implementation
  */
 
 /*
- *  COPYRIGHT (c) 1989-2002.
- *  On-Line Applications Research Corporation (OAR).
+ * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 1989 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
  *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <rtems/rtems/statusimpl.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/thread.h>
 #include <rtems/rtems/timerimpl.h>
-#include <rtems/score/watchdog.h>
+#include <rtems/rtems/objectimpl.h>
 
-rtems_status_code rtems_timer_ident(
-  rtems_name    name,
-  rtems_id     *id
-)
+rtems_status_code rtems_timer_ident( rtems_name name, rtems_id *id )
 {
-  Objects_Name_or_id_lookup_errors  status;
-
-  status = _Objects_Name_to_id_u32(
-    &_Timer_Information,
+  return _RTEMS_Name_to_id(
     name,
     OBJECTS_SEARCH_LOCAL_NODE,
-    id
+    id,
+    &_Timer_Information
   );
-
-  return _Status_Object_name_errors_to_status[ status ];
 }
diff --git a/cpukit/sapi/src/extensionident.c b/cpukit/sapi/src/extensionident.c
index c92a779..d408f68 100644
--- a/cpukit/sapi/src/extensionident.c
+++ b/cpukit/sapi/src/extensionident.c
@@ -1,42 +1,52 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
- * @ingroup ClassicUserExtensions
+ * @ingroup ClassicUserExtensionsImpl
  *
- * @brief User Extensions Implementation.
+ * @brief rtems_extension_ident() Implementation
  */
 
 /*
- *  COPYRIGHT (c) 1989-2007.
- *  On-Line Applications Research Corporation (OAR).
+ * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 1989 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
  *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <rtems/rtems/statusimpl.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/thread.h>
 #include <rtems/extensionimpl.h>
+#include <rtems/rtems/objectimpl.h>
 
-rtems_status_code rtems_extension_ident(
-  rtems_name    name,
-  rtems_id     *id
-)
+rtems_status_code rtems_extension_ident( rtems_name name, rtems_id *id )
 {
-  Objects_Name_or_id_lookup_errors  status;
-
-  status = _Objects_Name_to_id_u32(
-    &_Extension_Information,
+  return _RTEMS_Name_to_id(
     name,
     OBJECTS_SEARCH_LOCAL_NODE,
-    id
+    id,
+    &_Extension_Information
   );
-
-  return _Status_Object_name_errors_to_status[ status ];
 }
diff --git a/cpukit/score/src/objectnametoid.c b/cpukit/score/src/objectnametoid.c
index 2a9052d..d89e161 100644
--- a/cpukit/score/src/objectnametoid.c
+++ b/cpukit/score/src/objectnametoid.c
@@ -21,10 +21,10 @@
 #include <rtems/score/objectimpl.h>
 
 Objects_Name_or_id_lookup_errors _Objects_Name_to_id_u32(
-  const Objects_Information *information,
   uint32_t                   name,
   uint32_t                   node,
-  Objects_Id                *id
+  Objects_Id                *id,
+  const Objects_Information *information
 )
 {
   bool                       search_local_node;
diff --git a/testsuites/sptests/spsimplesched02/init.c b/testsuites/sptests/spsimplesched02/init.c
index 27e2f65..d19d355 100644
--- a/testsuites/sptests/spsimplesched02/init.c
+++ b/testsuites/sptests/spsimplesched02/init.c
@@ -81,10 +81,10 @@ rtems_task Init(
   TEST_BEGIN();
 
   status = _Objects_Name_to_id_u32(
-    &_Thread_Information.Objects,
     rtems_build_name( 'I', 'D', 'L', 'E' ),
     RTEMS_SEARCH_LOCAL_NODE,
-    &Idle_id
+    &Idle_id,
+    &_Thread_Information.Objects
   );
   rtems_test_assert( status == RTEMS_SUCCESSFUL );
 



More information about the vc mailing list