forked from Imagelibrary/rtems
* itron/include/rtems/itron/object.h, itron/src/cre_tsk.c, libblock/src/show_bdbuf.c, libmisc/capture/capture-cli.c, libmisc/capture/capture.c, libmisc/monitor/mon-manager.c, libmisc/stackchk/check.c, posix/src/condinit.c, posix/src/keycreate.c, posix/src/mqueuecreatesupp.c, posix/src/mqueuedeletesupp.c, posix/src/mqueuenametoid.c, posix/src/mqueueopen.c, posix/src/mqueueunlink.c, posix/src/mutexinit.c, posix/src/pbarrierinit.c, posix/src/prwlockinit.c, posix/src/pspininit.c, posix/src/pthreadcreate.c, posix/src/pthreadexit.c, posix/src/semaphorecreatesupp.c, posix/src/semaphorenametoid.c, posix/src/timercreate.c, rtems/src/barrierident.c, rtems/src/dpmemident.c, rtems/src/msgqident.c, rtems/src/partident.c, rtems/src/ratemonident.c, rtems/src/regionident.c, rtems/src/semident.c, rtems/src/taskident.c, rtems/src/timerident.c, sapi/src/extensionident.c, score/Makefile.am, score/include/rtems/score/object.h, score/inline/rtems/score/object.inl, score/src/apimutexallocate.c, score/src/objectextendinformation.c, score/src/objectgetnameasstring.c, score/src/objectmp.c, score/src/objectnametoid.c: Convert the Objects_Name type from a simple type to a union of an unsigned 32 bit integer and a pointer. This should help eliminate weird casts between u32 and pointers in various places. The APIs now have to explicitly call _u32 or _string versions of helper routines. This should also simplify things and eliminate the need for ugly casts in some cases. * score/src/objectclearname.c, score/src/objectcomparenameraw.c, score/src/objectcomparenamestring.c, score/src/objectcopynameraw.c, score/src/objectcopynamestring.c: Removed.
57 lines
1.2 KiB
C
57 lines
1.2 KiB
C
/*
|
|
* Extension Manager -- rtems_extension_ident
|
|
*
|
|
* COPYRIGHT (c) 1989-2007.
|
|
* 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/rtems/support.h>
|
|
#include <rtems/score/object.h>
|
|
#include <rtems/score/thread.h>
|
|
#include <rtems/extension.h>
|
|
|
|
/*PAGE
|
|
*
|
|
* rtems_extension_ident
|
|
*
|
|
* This directive returns the system ID associated with
|
|
* the extension name.
|
|
*
|
|
* Input parameters:
|
|
* name - user defined message queue name
|
|
* id - pointer to extension id
|
|
*
|
|
* Output parameters:
|
|
* *id - message queue id
|
|
* RTEMS_SUCCESSFUL - if successful
|
|
* error code - if unsuccessful
|
|
*/
|
|
|
|
rtems_status_code rtems_extension_ident(
|
|
rtems_name name,
|
|
Objects_Id *id
|
|
)
|
|
{
|
|
Objects_Name_or_id_lookup_errors status;
|
|
|
|
status = _Objects_Name_to_id_u32(
|
|
&_Extension_Information,
|
|
name,
|
|
OBJECTS_SEARCH_LOCAL_NODE,
|
|
id
|
|
);
|
|
|
|
return _Status_Object_name_errors_to_status[ status ];
|
|
}
|