diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-05 21:37:20 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-05 21:37:20 +0000 |
commit | cdf42cd9b7e186a2d8164beb7421cf60745f3b97 (patch) | |
tree | 5152458b95de9041943bed667edd4b24f0953b90 /cpukit/score/src/objectgetinfo.c | |
parent | 2008-09-05 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-cdf42cd9b7e186a2d8164beb7421cf60745f3b97.tar.bz2 |
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.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/src/objectgetinfo.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/cpukit/score/src/objectgetinfo.c b/cpukit/score/src/objectgetinfo.c index 033f827891..de13fa1998 100644 --- a/cpukit/score/src/objectgetinfo.c +++ b/cpukit/score/src/objectgetinfo.c @@ -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; - if ( info->maximum == 0 ) - 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; } |