Changeset 256a462 in rtems


Ignore:
Timestamp:
08/20/96 21:41:08 (27 years ago)
Author:
Mark Johannes <Mark.Johannes@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
6702bffc
Parents:
c5c5f8c
Message:

Added Einval case for mutex not initialized

Files:
2 edited

Legend:

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

    rc5c5f8c r256a462  
    225225  empty_line();
    226226
     227  puts( "Init: pthread_mutex_init - EINVAL (NULL mutex_id)" );
     228  status = pthread_mutex_init( NULL, &attr );
     229  assert( status == EINVAL );
     230
    227231  puts( "Init: pthread_mutex_init - EINVAL (not initialized attr)" );
    228232  status = pthread_mutex_init( &Mutex_id, &destroyed_attr );
     
    271275    printf( "status = %d\n", status );
    272276  assert( !status );
     277
     278  puts( "Init: pthread_mutex_init - EBUSY (attempt to initialize an existing mutex)" );
     279  status = pthread_mutex_init( &Mutex_id, &attr );
     280  if ( !status )
     281    printf( "status = %d\n", status );
     282  assert( status == EBUSY );
    273283
    274284  puts( "Init: pthread_mutex_trylock - EINVAL (illegal ID)" );
  • testsuites/psxtests/psx05/init.c

    rc5c5f8c r256a462  
    225225  empty_line();
    226226
     227  puts( "Init: pthread_mutex_init - EINVAL (NULL mutex_id)" );
     228  status = pthread_mutex_init( NULL, &attr );
     229  assert( status == EINVAL );
     230
    227231  puts( "Init: pthread_mutex_init - EINVAL (not initialized attr)" );
    228232  status = pthread_mutex_init( &Mutex_id, &destroyed_attr );
     
    271275    printf( "status = %d\n", status );
    272276  assert( !status );
     277
     278  puts( "Init: pthread_mutex_init - EBUSY (attempt to initialize an existing mutex)" );
     279  status = pthread_mutex_init( &Mutex_id, &attr );
     280  if ( !status )
     281    printf( "status = %d\n", status );
     282  assert( status == EBUSY );
    273283
    274284  puts( "Init: pthread_mutex_trylock - EINVAL (illegal ID)" );
Note: See TracChangeset for help on using the changeset viewer.