From 6c06288f6452da96fa630f1482aeaaba5d217531 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 29 Jan 2008 21:52:21 +0000 Subject: 2008-01-29 Joel Sherrill * itron/src/exd_tsk.c, itron/src/task.c, libmisc/capture/capture.c, libmisc/monitor/mon-config.c, libmisc/monitor/mon-driver.c, libmisc/monitor/mon-itask.c, libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-mpci.c, libmisc/monitor/mon-object.c, libmisc/monitor/mon-symbols.c, posix/src/cancelrun.c, posix/src/pthreadexit.c, rtems/Makefile.am, rtems/preinstall.am, rtems/include/rtems.h, rtems/include/rtems/rtems/support.h, rtems/inline/rtems/rtems/tasks.inl, rtems/src/eventmp.c, rtems/src/msgmp.c, rtems/src/partmp.c, rtems/src/regionmp.c, rtems/src/rtemsobjectgetname.c, rtems/src/semmp.c, rtems/src/signalmp.c, rtems/src/taskdelete.c, rtems/src/taskmp.c, rtems/src/timerserver.c, score/Makefile.am, score/include/rtems/score/object.h, score/inline/rtems/score/object.inl, score/src/Unlimited.txt, score/src/objectgetnameasstring.c, score/src/threadqextractwithproxy.c: Add new Object Services collection. This changed the name of a few previously public but undocumented services and added a some new services. * rtems/include/rtems/rtems/object.h, rtems/src/rtemsbuildid.c, rtems/src/rtemsbuildname.c, rtems/src/rtemsobjectapimaximumclass.c, rtems/src/rtemsobjectapiminimumclass.c, rtems/src/rtemsobjectgetapiclassname.c, rtems/src/rtemsobjectgetapiname.c, rtems/src/rtemsobjectgetclassicname.c, rtems/src/rtemsobjectgetclassinfo.c, rtems/src/rtemsobjectidapimaximum.c, rtems/src/rtemsobjectidapiminimum.c, rtems/src/rtemsobjectidgetapi.c, rtems/src/rtemsobjectidgetclass.c, rtems/src/rtemsobjectidgetindex.c, rtems/src/rtemsobjectidgetnode.c, rtems/src/rtemsobjectsetname.c, score/src/objectapimaximumclass.c, score/src/objectgetinfo.c, score/src/objectgetinfoid.c, score/src/objectsetname.c: New files. * rtems/src/rtemsidtoname.c: Removed. --- cpukit/score/include/rtems/score/object.h | 81 +++++++++++++++++++++++++++++-- 1 file changed, 78 insertions(+), 3 deletions(-) (limited to 'cpukit/score/include/rtems/score/object.h') diff --git a/cpukit/score/include/rtems/score/object.h b/cpukit/score/include/rtems/score/object.h index c1a9c040db..ffc34a46a0 100644 --- a/cpukit/score/include/rtems/score/object.h +++ b/cpukit/score/include/rtems/score/object.h @@ -9,7 +9,7 @@ */ /* - * COPYRIGHT (c) 1989-2007. + * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -497,6 +497,18 @@ void _Objects_Initialize_information ( #endif ); +/** + * This function returns the highest numeric value of a valid + * API for the specified @code{api}. + * + * @param[in] api is the API of interest + * + * @return A positive integer on success and -1 otherwise. + */ +int _Objects_API_maximum_class( + uint32_t api +); + /** * This function allocates a object control block from * the inactive chain of free object control blocks. @@ -535,6 +547,22 @@ void _Objects_Free( Objects_Control *the_object ); +/** + * This macro is used to build a thirty-two bit style name from + * four characters. The most significant byte will be the + * character @code{_C1}. + * + * @param[in] _C1 is the first character of the name + * @param[in] _C2 is the second character of the name + * @param[in] _C3 is the third character of the name + * @param[in] _C4 is the fourth character of the name + */ +#define _Objects_Build_name( _C1, _C2, _C3, _C4 ) \ + ( (uint32_t)(_C1) << 24 | \ + (uint32_t)(_C2) << 16 | \ + (uint32_t)(_C3) << 8 | \ + (uint32_t)(_C4) ) + /** * This function implements the common portion of the object * identification directives. This directive returns the object @@ -677,7 +705,7 @@ Objects_Control *_Objects_Get ( * * @note _Objects_Get returns with dispatching disabled for * local and remote objects. _Objects_Get_isr_disable returns with - * dispatching disabled for remote objects and interrupts for local + * dispatchng disabled for remote objects and interrupts for local * objects. */ Objects_Control *_Objects_Get_isr_disable( @@ -763,6 +791,37 @@ Objects_Control *_Objects_Get_next( Objects_Id *next_id_p ); +/** + * This function return the information structure given + * an the API and Class. This can be done independent of + * the existence of any objects created by the API. + * + * @param[in] api indicates the API for the information we want + * @param[in] api indicates the Class for the information we want + * + * + * @return This method returns a pointer to the Object Information Table + * for the class of objects which corresponds to this object ID. + */ +Objects_Information *_Objects_Get_information( + Objects_APIs api, + uint32_t class +); + +/** + * This function return the information structure given + * an id of an object. + * + * @param[in] id is an object ID + * + * + * @return This method returns a pointer to the Object Information Table + * for the class of objects which corresponds to this object ID. + */ +Objects_Information *_Objects_Get_information_id( + Objects_Id id +); + /** * This method objects the name of an object and returns its name * in the form of a C string. It attempts to be careful about @@ -774,13 +833,29 @@ Objects_Control *_Objects_Get_next( * * @return This method returns @a name or NULL on error. */ - char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ); +/** + * This method sets the object name to either a copy of a string + * or up to the first four characters of the string based upon + * whether this object class uses strings for names. + * + * @param[in] information points to the object information structure + * @param[in] the_object is the object to operate upon + * @param[in] name is a pointer to the name to use + * + * @return If successful, TRUE is returned. Otherwise FALSE is returned. + */ +boolean _Objects_Set_name( + Objects_Information *information, + Objects_Control *the_object, + const char *name +); + /* * Pieces of object.inl are promoted out to the user */ -- cgit v1.2.3