mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 08:55:47 +08:00
Init: added pthread_cond_init with an attr non-NULL, initialized the attr again
This commit is contained in:
@@ -47,6 +47,10 @@ void *POSIX_Init(
|
||||
printf( "status = %d\n", status );
|
||||
assert( status == EINVAL );
|
||||
|
||||
puts( "Init: pthread_condattr_init" );
|
||||
status = pthread_condattr_init( &attr );
|
||||
assert( !status );
|
||||
|
||||
puts( "Init: pthread_condattr_setpshared - PTHREAD_PROCESS_SHARED" );
|
||||
status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
|
||||
assert( !status );
|
||||
@@ -88,6 +92,10 @@ void *POSIX_Init(
|
||||
status = pthread_cond_destroy( &cond );
|
||||
assert( !status );
|
||||
|
||||
puts( "Init: pthread_cond_init - attr" );
|
||||
status = pthread_cond_init( &cond, &attr );
|
||||
assert( !status );
|
||||
|
||||
/* create a thread */
|
||||
|
||||
/*
|
||||
|
||||
@@ -47,6 +47,10 @@ void *POSIX_Init(
|
||||
printf( "status = %d\n", status );
|
||||
assert( status == EINVAL );
|
||||
|
||||
puts( "Init: pthread_condattr_init" );
|
||||
status = pthread_condattr_init( &attr );
|
||||
assert( !status );
|
||||
|
||||
puts( "Init: pthread_condattr_setpshared - PTHREAD_PROCESS_SHARED" );
|
||||
status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
|
||||
assert( !status );
|
||||
@@ -88,6 +92,10 @@ void *POSIX_Init(
|
||||
status = pthread_cond_destroy( &cond );
|
||||
assert( !status );
|
||||
|
||||
puts( "Init: pthread_cond_init - attr" );
|
||||
status = pthread_cond_init( &cond, &attr );
|
||||
assert( !status );
|
||||
|
||||
/* create a thread */
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user