From 6e4c01e3a2c07d3d42c510fbff70c14ccbafd2df Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Fri, 23 Aug 2013 14:56:36 +1000 Subject: posix: Update to the pthread_once changes. Implement the reeview changes. Add a POSIX Fatal error domain. Fix confdefs.h to correctly handle the internal POSIX mutexes. --- testsuites/psxtests/psx01/init.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'testsuites/psxtests/psx01') diff --git a/testsuites/psxtests/psx01/init.c b/testsuites/psxtests/psx01/init.c index 59605b49af..1d1a9e8e63 100644 --- a/testsuites/psxtests/psx01/init.c +++ b/testsuites/psxtests/psx01/init.c @@ -20,6 +20,18 @@ #include +pthread_once_t nesting_once = PTHREAD_ONCE_INIT; + +void Test_init_routine_nesting( void ); + +void Test_init_routine_nesting( void ) +{ + int status; + puts( "Test_init_routine_nesting: invoked" ); + status = pthread_once( &nesting_once, Test_init_routine_nesting ); + rtems_test_assert( status == EINVAL ); +} + void *POSIX_Init( void *argument ) @@ -95,6 +107,11 @@ void *POSIX_Init( ); rtems_test_assert( !status ); + /* once nesting */ + puts( "Init: pthread_once - SUCCESSFUL (init_routine_nesting executes)" ); + status = pthread_once( &nesting_once, Test_init_routine_nesting ); + rtems_test_assert( !status ); + /* create a thread */ puts( "Init: pthread_create - SUCCESSFUL" ); -- cgit v1.2.3