Changeset 3899bc1a in rtems for cpukit/posix


Ignore:
Timestamp:
Nov 24, 2018, 10:51:28 AM (13 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
1c2d178
Parents:
359a3a3
git-author:
Sebastian Huber <sebastian.huber@…> (11/24/18 10:51:28)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/07/18 13:22:01)
Message:

score: Optimize object lookup

Use the maximum ID for the ID to object translation. Using the maximum
ID gets rid of an additional load from the object information in
_Objects_Get(). In addition, object lookups fail for every ID in case
the object information is cleared to zero. This makes it a bit more
robust during system startup (see new tests in spconfig02).

The local table no longer needs a NULL pointer entry at array index
zero. Adjust all the object iteration loops accordingly.

Remove Objects_Information::minimum_id since it contains only redundant
information. Add _Objects_Get_minimum_id() to get the minimum ID.

Update #3621.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/killinfo.c

    r359a3a3 r3899bc1a  
    211211    object_table = the_info->local_table;
    212212
    213     for ( index = 1 ; index <= maximum ; index++ ) {
     213    for ( index = 0 ; index < maximum ; ++index ) {
    214214      the_thread = (Thread_Control *) object_table[ index ];
    215215
Note: See TracChangeset for help on using the changeset viewer.