Changeset aad3fe6 in rtems


Ignore:
Timestamp:
08/12/96 21:49:54 (27 years ago)
Author:
Mark Johannes <Mark.Johannes@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
a7f4c5a
Parents:
08515de
Message:

Init.c: added cases for signal, wait and broadcast

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/tests/psxtests/psx10/init.c

    r08515de raad3fe6  
    8282  puts( "Init: pthread_condattr_getpshared - EINVAL" );
    8383
    84   Init_id = pthread_self();
    85   printf( "Init: ID is 0x%08x\n", Init_id );
    86 
    8784  puts( "Init: pthread_cond_init - NULL attr" );
    8885  status = pthread_cond_init( &cond, NULL );
     
    9491
    9592  puts( "Init: pthread_cond_init - attr" );
    96   status = pthread_cond_init( &cond, &attr );
     93  status = pthread_cond_init( &Cond1_id, &attr );
    9794  assert( !status );
    9895
    9996  /* create a thread */
    10097
    101 /*
    102   status = pthread_create( &thread_id, NULL, Task_1_through_3, NULL );
     98  empty_line();
     99
     100  status = pthread_create( &Task_id, NULL, Task_1, NULL );
    103101  assert( !status );
    104 */
     102
     103  puts( "Init: sleep to switch to Task_1" );
     104  sleep( 1 );
     105
     106  puts( "Init: pthread_cond_signal" );
     107  status = pthread_cond_signal( &Cond1_id );
     108  assert( !status );
     109
     110  empty_line();
     111
     112  status = pthread_create( &Task2_id, NULL, Task_2, NULL );
     113  assert( !status );
     114
     115  puts( "Init: sleep - switch to Task_1 and Task_2" );
     116  sleep( 1 );
     117
     118  puts( "Init: pthread_cond_broadcast" );
     119  status = pthread_cond_broadcast( &Cond1_id );
     120  assert( !status );
     121
     122  puts( "Init: sleep - switch to Task_1" );
     123  sleep( 1 );
    105124
    106125  /* exit this thread */
  • testsuites/psxtests/psx10/init.c

    r08515de raad3fe6  
    8282  puts( "Init: pthread_condattr_getpshared - EINVAL" );
    8383
    84   Init_id = pthread_self();
    85   printf( "Init: ID is 0x%08x\n", Init_id );
    86 
    8784  puts( "Init: pthread_cond_init - NULL attr" );
    8885  status = pthread_cond_init( &cond, NULL );
     
    9491
    9592  puts( "Init: pthread_cond_init - attr" );
    96   status = pthread_cond_init( &cond, &attr );
     93  status = pthread_cond_init( &Cond1_id, &attr );
    9794  assert( !status );
    9895
    9996  /* create a thread */
    10097
    101 /*
    102   status = pthread_create( &thread_id, NULL, Task_1_through_3, NULL );
     98  empty_line();
     99
     100  status = pthread_create( &Task_id, NULL, Task_1, NULL );
    103101  assert( !status );
    104 */
     102
     103  puts( "Init: sleep to switch to Task_1" );
     104  sleep( 1 );
     105
     106  puts( "Init: pthread_cond_signal" );
     107  status = pthread_cond_signal( &Cond1_id );
     108  assert( !status );
     109
     110  empty_line();
     111
     112  status = pthread_create( &Task2_id, NULL, Task_2, NULL );
     113  assert( !status );
     114
     115  puts( "Init: sleep - switch to Task_1 and Task_2" );
     116  sleep( 1 );
     117
     118  puts( "Init: pthread_cond_broadcast" );
     119  status = pthread_cond_broadcast( &Cond1_id );
     120  assert( !status );
     121
     122  puts( "Init: sleep - switch to Task_1" );
     123  sleep( 1 );
    105124
    106125  /* exit this thread */
Note: See TracChangeset for help on using the changeset viewer.