diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-15 13:48:44 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-15 13:57:53 +0200 |
commit | c030edde3f76f23d6fe64df940a8ca059f0404e6 (patch) | |
tree | 20651d2bb3a61821bc7d0cccf93f3851b3109994 /testsuites/psxtests/psx10/init.c | |
parent | posix: Allow PTHREAD_PROCESS_SHARED for barriers (diff) | |
download | rtems-c030edde3f76f23d6fe64df940a8ca059f0404e6.tar.bz2 |
posix: Allow PTHREAD_PROCESS_SHARED for condvar
Close #3137.
Diffstat (limited to 'testsuites/psxtests/psx10/init.c')
-rw-r--r-- | testsuites/psxtests/psx10/init.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuites/psxtests/psx10/init.c b/testsuites/psxtests/psx10/init.c index a37e14efba..24265ba0ad 100644 --- a/testsuites/psxtests/psx10/init.c +++ b/testsuites/psxtests/psx10/init.c @@ -115,6 +115,25 @@ void *POSIX_Init( rtems_test_assert( status == EINVAL ); puts( "Init: pthread_cond_destroy - EINVAL (cond invalid)" ); +/* pshared tests */ + + puts( "Init: pthread_cond_init - EINVAL (invalid pshared)" ); + attr.process_shared = -1; + status = pthread_cond_init( &cond, &attr ); + rtems_test_assert( status == EINVAL ); + + puts( "Init: pthread_condattr_setpshared - PTHREAD_PROCESS_SHARED" ); + status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_SHARED ); + rtems_test_assert( status == 0 ); + + puts( "Init: pthread_cond_init - OK" ); + status = pthread_cond_init( &cond, &attr ); + rtems_test_assert( status == 0 ); + + puts( "Init: pthread_cond_destroy - OK" ); + status = pthread_cond_destroy( &cond ); + rtems_test_assert( status == 0 ); + /* initiailize the attribute for the rest of the test */ puts( "Init: pthread_cond_init - attr" ); |