2008-09-05 Joel Sherrill <joel.sherrill@oarcorp.com>

* score/src/objectgetinfo.c: Correct for multiprocessor systems when
	all object instances within a particular class are remote.
This commit is contained in:
Joel Sherrill
2008-09-05 21:37:20 +00:00
parent f2b169a4a5
commit cdf42cd9b7
2 changed files with 16 additions and 3 deletions

View File

@@ -1,3 +1,8 @@
2008-09-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/src/objectgetinfo.c: Correct for multiprocessor systems when
all object instances within a particular class are remote.
2008-09-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/assocnamebad.c: Correct file name in message.

View File

@@ -33,7 +33,8 @@ Objects_Information *_Objects_Get_information(
return NULL;
the_class_api_maximum = _Objects_API_maximum_class( the_api );
if ( the_class_api_maximum < 0 || the_class > (uint32_t) the_class_api_maximum )
if ( the_class_api_maximum < 0 ||
the_class > (uint32_t) the_class_api_maximum )
return NULL;
if ( !_Objects_Information_table[ the_api ] )
@@ -43,8 +44,15 @@ Objects_Information *_Objects_Get_information(
if ( !info )
return NULL;
/*
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}