Changeset b521ae2 in rtems for cpukit/posix/src/key.c


Ignore:
Timestamp:
08/06/96 16:23:09 (27 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
06883e13
Parents:
20de272
Message:

pthread_getspecific: use local variable so references to tcb are completed
before enabling dispatching

File:
1 edited

Legend:

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

    r20de272 rb521ae2  
    124124      class = _Objects_Get_class( _Thread_Executing->Object.id );
    125125      the_key->Values[ class ][ index ] = (void *) value;
     126      _Thread_Enable_dispatch();
    126127      return 0;
    127128  }
     
    142143  unsigned32                   class;
    143144  Objects_Locations            location;
     145  void                        *key_data;
    144146 
    145147  the_key = _POSIX_Keys_Get( key, &location );
     
    152154      index = _Objects_Get_index( _Thread_Executing->Object.id );
    153155      class = _Objects_Get_class( _Thread_Executing->Object.id );
    154       return (void *) the_key->Values[ class ][ index ];
     156      key_data = (void *) the_key->Values[ class ][ index ];
     157      _Thread_Enable_dispatch();
     158      return key_data;
    155159  }
    156160  return (void *) POSIX_BOTTOM_REACHED();
     
    192196
    193197      _POSIX_Keys_Free( the_key );
     198      _Thread_Enable_dispatch();
    194199      return 0;
    195200  }
Note: See TracChangeset for help on using the changeset viewer.