Possible bug in cpukit/score/src/objectgetbyindex.c

Wendell Pereira da Silva wendell.silva at compsisnet.com.br
Tue Jun 15 11:44:03 UTC 2010


Hi,

Is this code correct? I think a call to _Thread_Enable_dispatch() is missing (as indicated below).

Objects_Control *_Objects_Get_by_index(
  Objects_Information *information,
  uint32_t             index,
  Objects_Locations   *location
)
{
  Objects_Control *the_object;

  if ( information->maximum >= index ) {
    _Thread_Disable_dispatch();
    the_object = information->local_table[ index ];
    if ( the_object ) {
      *location = OBJECTS_LOCAL;
      [***** Is a call to _Thread_Enable_dispatch() missing here? ****]
      return( the_object );
    }
    _Thread_Enable_dispatch();
    *location = OBJECTS_ERROR;
    return( NULL );
  }


Regards,
Wendell.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20100615/31802eb1/attachment.html>


More information about the users mailing list