diff options
author | Chris Johns <chrisj@rtems.org> | 2013-08-23 14:56:36 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2013-08-23 14:56:36 +1000 |
commit | 6e4c01e3a2c07d3d42c510fbff70c14ccbafd2df (patch) | |
tree | ec6d62205983fabb345a6d84cd50804265fe3349 /testsuites | |
parent | bsps/arm: Add more CP15 cache functions (diff) | |
download | rtems-6e4c01e3a2c07d3d42c510fbff70c14ccbafd2df.tar.bz2 |
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.
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/psxtests/psx01/init.c | 17 | ||||
-rw-r--r-- | testsuites/psxtests/psxconfig01/init.c | 27 |
2 files changed, 32 insertions, 12 deletions
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 <rtems/score/todimpl.h> +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" ); diff --git a/testsuites/psxtests/psxconfig01/init.c b/testsuites/psxtests/psxconfig01/init.c index dcf15ff542..e0d1ffcd35 100644 --- a/testsuites/psxtests/psxconfig01/init.c +++ b/testsuites/psxtests/psxconfig01/init.c @@ -162,6 +162,19 @@ #define CONFIGURE_MESSAGE_BUFFER_MEMORY \ (MQ_BUFFER_MEMORY + POSIX_MQ_BUFFER_MEMORY) +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER + +#define CONFIGURE_MAXIMUM_DRIVERS 2 + +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_INIT + +static rtems_task Init(rtems_task_argument argument); + +#include <rtems/confdefs.h> + typedef struct { uint64_t data [16]; } area; @@ -469,7 +482,8 @@ static rtems_task Init(rtems_task_argument argument) } rtems_resource_snapshot_take(&snapshot); rtems_test_assert( - snapshot.posix_api.active_mutexes == CONFIGURE_MAXIMUM_POSIX_MUTEXES + snapshot.posix_api.active_mutexes == + (CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_MAXIMUM_POSIX_INTERNAL_MUTEXES) ); #endif @@ -543,14 +557,3 @@ static rtems_task Init(rtems_task_argument argument) rtems_test_exit(0); } - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_MAXIMUM_DRIVERS 2 - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_INIT - -#include <rtems/confdefs.h> |