mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
Init: added condattr - destroy, init, set and get cases
This commit is contained in:
@@ -54,27 +54,27 @@ void *POSIX_Init(
|
|||||||
status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE );
|
status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE );
|
||||||
assert( !status );
|
assert( !status );
|
||||||
|
|
||||||
puts( "Init: pthread_condattr_setpshared - EINVAL - attr" );
|
|
||||||
status = pthread_condattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE );
|
status = pthread_condattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE );
|
||||||
if ( status != EINVAL )
|
if ( status != EINVAL )
|
||||||
printf( "status = %d\n", status );
|
printf( "status = %d\n", status );
|
||||||
assert( status == EINVAL );
|
assert( status == EINVAL );
|
||||||
|
puts( "Init: pthread_condattr_setpshared - EINVAL - attr" );
|
||||||
|
|
||||||
puts( "Init: pthread_condattr_setpshared - EINVAL - pshared" );
|
|
||||||
status = pthread_condattr_setpshared( &attr, 0xFFFFFF );
|
status = pthread_condattr_setpshared( &attr, 0xFFFFFF );
|
||||||
if ( status != EINVAL )
|
if ( status != EINVAL )
|
||||||
printf( "status = %d\n", status );
|
printf( "status = %d\n", status );
|
||||||
assert( status == EINVAL );
|
assert( status == EINVAL );
|
||||||
|
puts( "Init: pthread_condattr_setpshared - EINVAL - pshared" );
|
||||||
|
|
||||||
status = pthread_condattr_getpshared( &attr, &pshared );
|
status = pthread_condattr_getpshared( &attr, &pshared );
|
||||||
assert( !status );
|
assert( !status );
|
||||||
printf( "Init: pthread_condattr_getpshared - %d", pshared );
|
printf( "Init: pthread_condattr_getpshared - %d\n", pshared );
|
||||||
|
|
||||||
puts( "Init: pthread_condattr_getpshared - EINVAL" );
|
|
||||||
status = pthread_condattr_getpshared( NULL, &pshared );
|
status = pthread_condattr_getpshared( NULL, &pshared );
|
||||||
if ( status != EINVAL )
|
if ( status != EINVAL )
|
||||||
printf( "status = %d\n", status );
|
printf( "status = %d\n", status );
|
||||||
assert( status == EINVAL );
|
assert( status == EINVAL );
|
||||||
|
puts( "Init: pthread_condattr_getpshared - EINVAL" );
|
||||||
|
|
||||||
Init_id = pthread_self();
|
Init_id = pthread_self();
|
||||||
printf( "Init: ID is 0x%08x\n", Init_id );
|
printf( "Init: ID is 0x%08x\n", Init_id );
|
||||||
@@ -88,7 +88,8 @@ void *POSIX_Init(
|
|||||||
|
|
||||||
/* exit this thread */
|
/* exit this thread */
|
||||||
|
|
||||||
pthread_exit( NULL );
|
puts( "*** END OF POSIX TEST 5 ***" );
|
||||||
|
exit( 0 );
|
||||||
|
|
||||||
return NULL; /* just so the compiler thinks we returned something */
|
return NULL; /* just so the compiler thinks we returned something */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,27 +54,27 @@ void *POSIX_Init(
|
|||||||
status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE );
|
status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE );
|
||||||
assert( !status );
|
assert( !status );
|
||||||
|
|
||||||
puts( "Init: pthread_condattr_setpshared - EINVAL - attr" );
|
|
||||||
status = pthread_condattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE );
|
status = pthread_condattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE );
|
||||||
if ( status != EINVAL )
|
if ( status != EINVAL )
|
||||||
printf( "status = %d\n", status );
|
printf( "status = %d\n", status );
|
||||||
assert( status == EINVAL );
|
assert( status == EINVAL );
|
||||||
|
puts( "Init: pthread_condattr_setpshared - EINVAL - attr" );
|
||||||
|
|
||||||
puts( "Init: pthread_condattr_setpshared - EINVAL - pshared" );
|
|
||||||
status = pthread_condattr_setpshared( &attr, 0xFFFFFF );
|
status = pthread_condattr_setpshared( &attr, 0xFFFFFF );
|
||||||
if ( status != EINVAL )
|
if ( status != EINVAL )
|
||||||
printf( "status = %d\n", status );
|
printf( "status = %d\n", status );
|
||||||
assert( status == EINVAL );
|
assert( status == EINVAL );
|
||||||
|
puts( "Init: pthread_condattr_setpshared - EINVAL - pshared" );
|
||||||
|
|
||||||
status = pthread_condattr_getpshared( &attr, &pshared );
|
status = pthread_condattr_getpshared( &attr, &pshared );
|
||||||
assert( !status );
|
assert( !status );
|
||||||
printf( "Init: pthread_condattr_getpshared - %d", pshared );
|
printf( "Init: pthread_condattr_getpshared - %d\n", pshared );
|
||||||
|
|
||||||
puts( "Init: pthread_condattr_getpshared - EINVAL" );
|
|
||||||
status = pthread_condattr_getpshared( NULL, &pshared );
|
status = pthread_condattr_getpshared( NULL, &pshared );
|
||||||
if ( status != EINVAL )
|
if ( status != EINVAL )
|
||||||
printf( "status = %d\n", status );
|
printf( "status = %d\n", status );
|
||||||
assert( status == EINVAL );
|
assert( status == EINVAL );
|
||||||
|
puts( "Init: pthread_condattr_getpshared - EINVAL" );
|
||||||
|
|
||||||
Init_id = pthread_self();
|
Init_id = pthread_self();
|
||||||
printf( "Init: ID is 0x%08x\n", Init_id );
|
printf( "Init: ID is 0x%08x\n", Init_id );
|
||||||
@@ -88,7 +88,8 @@ void *POSIX_Init(
|
|||||||
|
|
||||||
/* exit this thread */
|
/* exit this thread */
|
||||||
|
|
||||||
pthread_exit( NULL );
|
puts( "*** END OF POSIX TEST 5 ***" );
|
||||||
|
exit( 0 );
|
||||||
|
|
||||||
return NULL; /* just so the compiler thinks we returned something */
|
return NULL; /* just so the compiler thinks we returned something */
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user