RTEMS
objectnamespaceremove.c
Go to the documentation of this file.
1 
9 /*
10  * COPYRIGHT (c) 1989-2008.
11  * On-Line Applications Research Corporation (OAR).
12  *
13  * The license and distribution terms for this file may be
14  * found in the file LICENSE in this distribution or at
15  * http://www.rtems.org/license/LICENSE.
16  */
17 
18 #ifdef HAVE_CONFIG_H
19 #include "config.h"
20 #endif
21 
22 #include <rtems/score/objectimpl.h>
23 #include <rtems/score/wkspace.h>
24 
26  const Objects_Information *information,
27  Objects_Control *the_object
28 )
29 {
30  char *name;
31 
32  _Assert( _Objects_Has_string_name( information ) );
33  name = RTEMS_DECONST( char *, the_object->name.name_p );
34  the_object->name.name_p = NULL;
35  _Workspace_Free( name );
36 }
void _Workspace_Free(void *block)
Frees memory to the workspace.
Inlined Routines in the Object Handler.
static __inline__ bool _Objects_Has_string_name(const Objects_Information *information)
Returns if the object has a string name.
Definition: objectimpl.h:411
The information structure used to manage each API class of objects.
Definition: objectdata.h:176
const char * name_p
Definition: object.h:66
void _Objects_Namespace_remove_string(const Objects_Information *information, Objects_Control *the_object)
Removes object with a string name from its namespace.
Objects_Name name
Definition: objectdata.h:45
#define RTEMS_DECONST(_type, _var)
Performs a type cast which removes const qualifiers without warnings to the specified type for the sp...
Definition: basedefs.h:579
Information Related to the RAM Workspace.
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG.
Definition: assert.h:100