2008-01-31 Joel Sherrill <joel.sherrill@OARcorp.com>

* score/include/rtems/score/object.h, score/src/objectgetinfo.c,
	rtems/include/rtems/rtems/object.h,
	rtems/src/rtemsobjectgetapiclassname.c,
	rtems/src/rtemsobjectgetclassinfo.c: class is a C++ keyword and
	cannot be used as a parameter.
This commit is contained in:
Joel Sherrill
2008-01-31 14:14:27 +00:00
parent 7d1714545b
commit 91b8fb9e9a
6 changed files with 34 additions and 25 deletions

View File

@@ -1,3 +1,11 @@
2008-01-31 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/include/rtems/score/object.h, score/src/objectgetinfo.c,
rtems/include/rtems/rtems/object.h,
rtems/src/rtemsobjectgetapiclassname.c,
rtems/src/rtemsobjectgetclassinfo.c: class is a C++ keyword and
cannot be used as a parameter.
2008-01-30 Joel Sherrill <joel.sherrill@OARcorp.com> 2008-01-30 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/Makefile.am, score/include/rtems/score/threadq.h, * score/Makefile.am, score/include/rtems/score/threadq.h,

View File

@@ -20,6 +20,7 @@
extern "C" { extern "C" {
#endif #endif
#include <stdint.h>
#include <rtems/score/object.h> #include <rtems/score/object.h>
#include <rtems/rtems/status.h> #include <rtems/rtems/status.h>
#include <rtems/rtems/types.h> #include <rtems/rtems/types.h>
@@ -287,26 +288,26 @@ const char *rtems_object_get_api_name(
* This method returns a string containing the name of the * This method returns a string containing the name of the
* @a class from the specified @a api. * @a class from the specified @a api.
* *
* @param[in] api is the API for the class * @param[in] the_api is the API for the class
* @param[in] class is the class to obtain the name of * @param[in] the_class is the class to obtain the name of
* *
* @return If successful, this method returns the name of * @return If successful, this method returns the name of
* the specified @a class. Otherwise, it returns * the specified @a class. Otherwise, it returns
* the string "BAD CLASS" * the string "BAD CLASS"
*/ */
const char *rtems_object_get_api_class_name( const char *rtems_object_get_api_class_name(
uint32_t api, uint32_t the_api,
uint32_t class uint32_t the_class
); );
/** /**
* @brief Get Class Name * @brief Get Class Name
* *
* This method returns a string containing the name of the * This method returns a string containing the name of the
* @a class from the specified @a api. * @a the_class from the specified @a api.
* *
* @param[in] api is the API for the class * @param[in] the_api is the API for the class
* @param[in] class is the class to obtain information about * @param[in] the_class is the class to obtain information about
* @param[in] info points to the information structure to fill in * @param[in] info points to the information structure to fill in
* *
* @return If successful, this method returns the name of * @return If successful, this method returns the name of
@@ -315,8 +316,8 @@ const char *rtems_object_get_api_class_name(
* *
*/ */
rtems_status_code rtems_object_get_class_information( rtems_status_code rtems_object_get_class_information(
uint32_t api, uint32_t the_api,
uint32_t class, uint32_t the_class,
rtems_object_api_class_information *info rtems_object_api_class_information *info
); );

View File

@@ -70,14 +70,14 @@ rtems_assoc_t rtems_object_api_itron_assoc[] = {
#endif #endif
const char *rtems_object_get_api_class_name( const char *rtems_object_get_api_class_name(
uint32_t api, uint32_t the_api,
uint32_t class uint32_t the_class
) )
{ {
const rtems_assoc_t *api_assoc; const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc; const rtems_assoc_t *class_assoc;
switch (api) { switch (the_api) {
case OBJECTS_INTERNAL_API: case OBJECTS_INTERNAL_API:
api_assoc = rtems_object_api_internal_assoc; api_assoc = rtems_object_api_internal_assoc;
break; break;
@@ -97,7 +97,7 @@ const char *rtems_object_get_api_class_name(
default: default:
return "BAD API"; return "BAD API";
} }
class_assoc = rtems_assoc_ptr_by_local( api_assoc, class ); class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc ) if ( class_assoc )
return class_assoc->name; return class_assoc->name;
return "BAD CLASS"; return "BAD CLASS";

View File

@@ -24,8 +24,8 @@
#include <rtems/rtems/object.h> #include <rtems/rtems/object.h>
rtems_status_code rtems_object_get_class_information( rtems_status_code rtems_object_get_class_information(
uint32_t api, uint32_t the_api,
uint32_t class, uint32_t the_class,
rtems_object_api_class_information *info rtems_object_api_class_information *info
) )
{ {
@@ -39,7 +39,7 @@ rtems_status_code rtems_object_get_class_information(
if ( !info ) if ( !info )
return RTEMS_INVALID_ADDRESS; return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( api, class ); obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info ) if ( !obj_info )
return RTEMS_INVALID_NUMBER; return RTEMS_INVALID_NUMBER;

View File

@@ -803,15 +803,15 @@ Objects_Control *_Objects_Get_next(
* an the API and Class. This can be done independent of * an the API and Class. This can be done independent of
* the existence of any objects created by the API. * the existence of any objects created by the API.
* *
* @param[in] api indicates the API for the information we want * @param[in] the_api indicates the API for the information we want
* @param[in] class indicates the Class for the information we want * @param[in] the_class indicates the Class for the information we want
* *
* @return This method returns a pointer to the Object Information Table * @return This method returns a pointer to the Object Information Table
* for the class of objects which corresponds to this object ID. * for the class of objects which corresponds to this object ID.
*/ */
Objects_Information *_Objects_Get_information( Objects_Information *_Objects_Get_information(
Objects_APIs api, Objects_APIs the_api,
uint32_t class uint32_t the_class
); );
/** /**

View File

@@ -19,19 +19,19 @@
#include <rtems/score/wkspace.h> #include <rtems/score/wkspace.h>
Objects_Information *_Objects_Get_information( Objects_Information *_Objects_Get_information(
Objects_APIs api, Objects_APIs the_api,
uint32_t class uint32_t the_class
) )
{ {
Objects_Information *info; Objects_Information *info;
if ( !_Objects_Is_api_valid( api ) ) if ( !_Objects_Is_api_valid( the_api ) )
return NULL; return NULL;
if ( !class || class > _Objects_API_maximum_class(api) ) if ( !the_class || the_class > _Objects_API_maximum_class(the_api) )
return NULL; return NULL;
info = _Objects_Information_table[ api ][ class ]; info = _Objects_Information_table[ the_api ][ the_class ];
if ( !info ) if ( !info )
return NULL; return NULL;