Changeset dd32d883 in rtems for c/src/exec/posix/src/pthread.c


Ignore:
Timestamp:
May 29, 1996, 10:46:05 PM (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
be1c11ed
Parents:
7f72217e
Message:

posix initialization threads table was misnamed "posix initialization
tasks table"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/posix/src/pthread.c

    r7f72217e rdd32d883  
    8585/*PAGE
    8686 *
    87  *  _POSIX_Threads_Initialize_user_tasks
     87 *  _POSIX_Threads_Initialize_user_threads
    8888 *
    8989 *  This routine creates and starts all configured user
     
    9595 */
    9696 
    97 void _POSIX_Threads_Initialize_user_tasks( void )
    98 {
    99   int                               status;
    100   unsigned32                        index;
    101   unsigned32                        maximum;
    102   posix_initialization_tasks_table *user_tasks;
    103   pthread_t                         thread_id;
    104  
    105   /*
    106    *  NOTE:  This is slightly different from the Ada implementation.
    107    */
    108  
    109   user_tasks = _POSIX_Threads_User_initialization_tasks;
    110   maximum    = _POSIX_Threads_Number_of_initialization_tasks;
    111 
    112   if ( !user_tasks || maximum == 0 )
     97void _POSIX_Threads_Initialize_user_threads( void )
     98{
     99  int                                 status;
     100  unsigned32                          index;
     101  unsigned32                          maximum;
     102  posix_initialization_threads_table *user_threads;
     103  pthread_t                           thread_id;
     104 
     105  user_threads = _POSIX_Threads_User_initialization_threads;
     106  maximum      = _POSIX_Threads_Number_of_initialization_threads;
     107
     108  if ( !user_threads || maximum == 0 )
    113109    return;
    114110 
    115111  for ( index=0 ; index < maximum ; index++ ) {
    116     status = pthread_create(&thread_id,  NULL, user_tasks[ index ].entry, NULL);
     112    status = pthread_create(
     113      &thread_id,
     114      NULL,
     115      user_threads[ index ].entry,
     116      NULL
     117    );
    117118    assert( !status );
    118119  }
     
    122123  { NULL, NULL },
    123124  NULL,                                     /* predriver */
    124   _POSIX_Threads_Initialize_user_tasks,     /* postdriver */
     125  _POSIX_Threads_Initialize_user_threads,   /* postdriver */
    125126  NULL,                                     /* post switch */
    126127};
     
    152153 
    153154void _POSIX_Threads_Manager_initialization(
    154   unsigned32                        maximum_pthreads,
    155   unsigned32                        number_of_initialization_tasks,
    156   posix_initialization_tasks_table *user_tasks
     155  unsigned32                          maximum_pthreads,
     156  unsigned32                          number_of_initialization_threads,
     157  posix_initialization_threads_table *user_threads
    157158 
    158159)
    159160{
    160   _POSIX_Threads_Number_of_initialization_tasks =
    161                                                  number_of_initialization_tasks;
    162   _POSIX_Threads_User_initialization_tasks = user_tasks;
     161  _POSIX_Threads_Number_of_initialization_threads =
     162                                           number_of_initialization_threads;
     163  _POSIX_Threads_User_initialization_threads = user_threads;
    163164
    164165  /*
     
    167168
    168169#if 0
    169   if ( user_tasks == NULL || number_of_initialization_tasks == 0 )
     170  if ( user_threads == NULL || number_of_initialization_threads == 0 )
    170171    _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, EINVAL );
    171172#endif
Note: See TracChangeset for help on using the changeset viewer.