summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/objectclose.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-02-06 23:54:55 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-02-06 23:54:55 +0000
commit9184270ac4ab137526cf15627d925cafcd3b3a52 (patch)
treec600d43831b5893e9fea4806eec6a9522f26057b /cpukit/score/src/objectclose.c
parent2008-02-06 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-9184270ac4ab137526cf15627d925cafcd3b3a52.tar.bz2
2008-02-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/src/mqueueunlink.c, score/Makefile.am, score/include/rtems/score/object.h, score/inline/rtems/score/object.inl: Enhance _Objects_Namespace_remove() to handle freeing object names which are strings. All changed _Objects_Close() to call _Objects_Namespace_remove(). The resulting code was then moved from inline routines to function calls. * score/src/objectclose.c, score/src/objectnamespaceremove.c: New files.
Diffstat (limited to 'cpukit/score/src/objectclose.c')
-rw-r--r--cpukit/score/src/objectclose.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/cpukit/score/src/objectclose.c b/cpukit/score/src/objectclose.c
new file mode 100644
index 0000000000..e28b8fdda6
--- /dev/null
+++ b/cpukit/score/src/objectclose.c
@@ -0,0 +1,32 @@
+/*
+ * COPYRIGHT (c) 1989-2008.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/system.h>
+#include <rtems/score/object.h>
+#include <rtems/score/wkspace.h>
+
+void _Objects_Close(
+ Objects_Information *information,
+ Objects_Control *the_object
+)
+{
+ _Objects_Set_local_object(
+ information,
+ _Objects_Get_index( the_object->id ),
+ NULL
+ );
+
+ _Objects_Namespace_remove( information, the_object );
+}