Changeset 36cd27c in rtems


Ignore:
Timestamp:
Apr 19, 2016, 12:12:06 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
d7a12be9
Parents:
f05eeb2
git-author:
Sebastian Huber <sebastian.huber@…> (04/19/16 12:12:06)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/21/16 05:29:40)
Message:

score: Simplify _Objects_Get_next()

Remove unused location parameter.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/src/resource_snapshot.c

    rf05eeb2 r36cd27c  
    108108static POSIX_Keys_Control *get_next_key(Objects_Id *id)
    109109{
    110   Objects_Locations location;
    111 
    112110  return (POSIX_Keys_Control *)
    113     _Objects_Get_next(&_POSIX_Keys_Information, *id, &location, id);
     111    _Objects_Get_next(*id, &_POSIX_Keys_Information, id);
    114112}
    115113
  • cpukit/libmisc/monitor/mon-manager.c

    rf05eeb2 r36cd27c  
    2727    rtems_monitor_generic_t *copy;
    2828    Objects_Control         *object = 0;
    29     Objects_Locations        location;
    3029
    3130    /*
     
    3837#endif
    3938
    40     object = _Objects_Get_next(table, *next_id, &location, next_id);
     39    object = _Objects_Get_next(*next_id, table, next_id);
    4140
    4241    if (object)
  • cpukit/score/include/rtems/score/objectimpl.h

    rf05eeb2 r36cd27c  
    681681 *  Locks the object allocator mutex in case a next object exists.
    682682 *
     683 *  @param[in] id is the Id of the object whose name we are locating.
     684 *    This is the first parameter since usual callers get the object identifier
     685 *    as the first parameter themself.
    683686 *  @param[in] information points to an object class information block.
    684  *  @param[in] id is the Id of the object whose name we are locating.
    685  *  @param[in] location_p will contain an indication of success or failure.
    686687 *  @param[in] next_id_p is the Id of the next object we will look at.
    687688 *
     
    690691 */
    691692Objects_Control *_Objects_Get_next(
    692     Objects_Information *information,
    693     Objects_Id           id,
    694     Objects_Locations   *location_p,
    695     Objects_Id          *next_id_p
     693  Objects_Id                 id,
     694  const Objects_Information *information,
     695  Objects_Id                *next_id_p
    696696);
    697697
  • cpukit/score/src/objectgetnext.c

    rf05eeb2 r36cd27c  
    2121#include <rtems/score/objectimpl.h>
    2222
    23 Objects_Control *
    24 _Objects_Get_next(
    25     Objects_Information *information,
    26     Objects_Id           id,
    27     Objects_Locations   *location_p,
    28     Objects_Id          *next_id_p
     23Objects_Control *_Objects_Get_next(
     24  Objects_Id                 id,
     25  const Objects_Information *information,
     26  Objects_Id                *next_id_p
    2927)
    3028{
     
    3331
    3432    if ( !information )
    35       return NULL;
    36 
    37     if ( !location_p )
    3833      return NULL;
    3934
     
    5348        {
    5449            _Objects_Allocator_unlock();
    55             *location_p = OBJECTS_ERROR;
    5650            *next_id_p = OBJECTS_ID_FINAL;
    5751            return NULL;
     
    6559    } while ( the_object == NULL );
    6660
    67     *location_p = OBJECTS_LOCAL;
    6861    *next_id_p = next_id;
    6962    return the_object;
  • testsuites/sptests/spobjgetnext/init.c

    rf05eeb2 r36cd27c  
    3636  Objects_Control  *o[MAX_SCAN];
    3737  int               i;
    38   Objects_Locations location;
    3938  Objects_Id        id;
    4039
     
    4443  for (i=0 ; i<MAX_SCAN ; i++ ) {
    4544    o[i] = _Objects_Get_next(
     45      id,
    4646      information,
    47       id,
    48       &location,
    4947      &id
    5048    );
    5149    if ( !o[i] )
    52       break;
    53     if ( location == OBJECTS_ERROR )
    5450      break;
    5551    /* XXX check dispatch level with macros */
     
    6763  int                   count;
    6864  Objects_Control      *o;
    69   Objects_Locations     location;
    7065  Objects_Id            id;
    7166  Objects_Information  *info;
     
    7873
    7974  puts( "Init - _Objects_Get_next - NULL object information" );
    80   o = _Objects_Get_next( NULL, main_task, &location, &id );
     75  o = _Objects_Get_next( main_task, NULL, &id );
    8176  rtems_test_assert( o == NULL );
    82 
    83   puts( "Init - _Objects_Get_next - NULL location" );
    84   o = _Objects_Get_next( info, main_task, NULL, &id );
    8577  rtems_test_assert( o == NULL );
    8678
    8779  puts( "Init - _Objects_Get_next - NULL id" );
    88   o = _Objects_Get_next( info, main_task, &location, NULL );
     80  o = _Objects_Get_next( main_task, info, NULL );
    8981  rtems_test_assert( o == NULL );
    9082
Note: See TracChangeset for help on using the changeset viewer.