psxtmtests: Add test.h support

This commit is contained in:
bjorn larsson
2014-03-21 15:35:26 -05:00
committed by Sebastian Huber
parent 2ead50ac4e
commit fd46711c54
44 changed files with 176 additions and 88 deletions

View File

@@ -16,6 +16,8 @@
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>
const char rtems_test_name[] = "PSXTMBARRIER 01";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
static void benchmark_pthread_barrier_init(void); static void benchmark_pthread_barrier_init(void);
@@ -71,14 +73,14 @@ void *POSIX_Init(
void *argument void *argument
) )
{ {
puts( "\n\n*** POSIX TIME TEST PSXTMBARRIER 01 ***" ); TEST_BEGIN();
/* creating barrier with default properties */ /* creating barrier with default properties */
benchmark_pthread_barrier_init(); benchmark_pthread_barrier_init();
/* destroying barrier */ /* destroying barrier */
benchmark_pthread_barrier_destroy(); benchmark_pthread_barrier_destroy();
puts( "*** END OF POSIX TIME TEST PSXTMBARRIER 01 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -19,6 +19,8 @@
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
const char rtems_test_name[] = "PSXTMBARRIER 02";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Middle(void *argument); void *Middle(void *argument);
@@ -50,7 +52,7 @@ void *Low(
0 0
); );
puts( "*** END OF POSIX TIME PSXTMBARRIER 02 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
@@ -84,7 +86,7 @@ void *POSIX_Init(
pthread_t threadId; pthread_t threadId;
pthread_barrierattr_t attr; pthread_barrierattr_t attr;
puts( "\n\n*** POSIX TIME PSXTMBARRIER 02 ***" ); TEST_BEGIN();
for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) { for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) {
status = pthread_create( &threadId, NULL, Middle, NULL ); status = pthread_create( &threadId, NULL, Middle, NULL );

View File

@@ -19,6 +19,8 @@
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
const char rtems_test_name[] = "PSXTMBARRIER 03";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Blocker(void *argument); void *Blocker(void *argument);
@@ -43,7 +45,7 @@ void *POSIX_Init(
pthread_t threadId; pthread_t threadId;
benchmark_timer_t end_time; benchmark_timer_t end_time;
puts( "\n\n*** POSIX TIME TEST PSXTMBARRIER 03 ***" ); TEST_BEGIN();
status = pthread_create( &threadId, NULL, Blocker, NULL ); status = pthread_create( &threadId, NULL, Blocker, NULL );
rtems_test_assert( status == 0 ); rtems_test_assert( status == 0 );
@@ -84,7 +86,7 @@ void *POSIX_Init(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMBARRIER 03 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;

View File

@@ -17,6 +17,8 @@
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
const char rtems_test_name[] = "PSXTMBARRIER 04";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Blocker(void *argument); void *Blocker(void *argument);
@@ -43,7 +45,7 @@ void *Blocker(
0, 0,
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMBARRIER 04 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
} }
@@ -57,7 +59,7 @@ void *POSIX_Init(
int policy; int policy;
struct sched_param param; struct sched_param param;
puts( "\n\n*** POSIX TIME TEST PSXTMBARRIER 04 ***" ); TEST_BEGIN();
status = pthread_create( &threadId, NULL, Blocker, NULL ); status = pthread_create( &threadId, NULL, Blocker, NULL );
rtems_test_assert( status == 0 ); rtems_test_assert( status == 0 );

View File

@@ -19,6 +19,8 @@
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
const char rtems_test_name[] = "PSXTMCOND 01";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void benchmark_create_cond_var(void); void benchmark_create_cond_var(void);
@@ -68,12 +70,12 @@ void *POSIX_Init(
void *argument void *argument
) )
{ {
puts( "\n\n*** POSIX TIME TEST PSXTMCOND01 ***" ); TEST_BEGIN();
benchmark_create_cond_var(); benchmark_create_cond_var();
benchmark_destroy_cond_var(); benchmark_destroy_cond_var();
puts( "*** END OF POSIX TIME TEST PSXTMCOND01 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -16,6 +16,8 @@
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMCOND 02";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void benchmark_signal(void); void benchmark_signal(void);
@@ -48,13 +50,13 @@ void *POSIX_Init(
void *argument void *argument
) )
{ {
puts( "\n\n*** POSIX TIME TEST PSXTMCOND02 ***" ); TEST_BEGIN();
pthread_cond_init(&CondID, NULL); pthread_cond_init(&CondID, NULL);
benchmark_signal(); benchmark_signal();
puts( "*** END OF POSIX TIME TEST PSXTMCOND02 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -19,6 +19,8 @@
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
const char rtems_test_name[] = "PSXTMCOND 03";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Blocker(void *argument); void *Blocker(void *argument);
@@ -54,7 +56,7 @@ void *POSIX_Init(
struct sched_param param; struct sched_param param;
int policy; int policy;
puts( "\n\n*** POSIX TIME TEST PSXTMCOND03 ***" ); TEST_BEGIN();
status = pthread_create( &threadId, NULL, Blocker, NULL ); status = pthread_create( &threadId, NULL, Blocker, NULL );
rtems_test_assert( status == 0 ); rtems_test_assert( status == 0 );
@@ -92,7 +94,7 @@ void *POSIX_Init(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMCOND03 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;

View File

@@ -19,6 +19,8 @@
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
const char rtems_test_name[] = "PSXTMCOND 04";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Blocker(void *argument); void *Blocker(void *argument);
@@ -54,7 +56,7 @@ void *Blocker(
0, 0,
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMCOND04 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
} }
@@ -66,7 +68,7 @@ void *POSIX_Init(
int status; int status;
pthread_t threadId; pthread_t threadId;
puts( "\n\n*** POSIX TIME TEST PSXTMCOND04 ***" ); TEST_BEGIN();
status = pthread_create( &threadId, NULL, Blocker, NULL ); status = pthread_create( &threadId, NULL, Blocker, NULL );
rtems_test_assert( status == 0 ); rtems_test_assert( status == 0 );

View File

@@ -16,6 +16,8 @@
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMCOND 05";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void benchmark_broadcast(void); void benchmark_broadcast(void);
@@ -47,13 +49,13 @@ void *POSIX_Init(
) )
{ {
puts( "\n\n*** POSIX TIME TEST PSXTMCOND05 ***" ); TEST_BEGIN();
pthread_cond_init(&CondID, NULL); pthread_cond_init(&CondID, NULL);
benchmark_broadcast(); benchmark_broadcast();
puts( "*** END OF POSIX TIME TEST PSXTMCOND05 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -21,6 +21,8 @@
#define N 5 #define N 5
const char rtems_test_name[] = "PSXTMCOND 06";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Blocker(void *argument); void *Blocker(void *argument);
@@ -58,7 +60,7 @@ void *POSIX_Init(
struct sched_param param; struct sched_param param;
int policy; int policy;
puts( "\n\n*** POSIX TIME TEST PSXTMCOND06 ***" ); TEST_BEGIN();
/* Setup variables */ /* Setup variables */
status = pthread_create( &threadId, NULL, Blocker, NULL ); status = pthread_create( &threadId, NULL, Blocker, NULL );
@@ -109,7 +111,7 @@ void *POSIX_Init(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMCOND06 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;

View File

@@ -21,6 +21,8 @@
#define N 1 #define N 1
const char rtems_test_name[] = "PSXTMCOND 07";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Blocker(void *argument); void *Blocker(void *argument);
@@ -50,7 +52,7 @@ void *Blocker(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMCOND07 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
@@ -66,7 +68,7 @@ void *POSIX_Init(
pthread_attr_t attr; pthread_attr_t attr;
struct sched_param param; struct sched_param param;
puts( "\n\n*** POSIX TIME TEST PSXTMCOND07 ***" ); TEST_BEGIN();
/* Setup variables */ /* Setup variables */
status = pthread_create( &threadId, NULL, Blocker, NULL ); status = pthread_create( &threadId, NULL, Blocker, NULL );

View File

@@ -35,6 +35,8 @@
#include <pthread.h> #include <pthread.h>
const char rtems_test_name[] = "PSXTMCOND 08";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Middle(void *argument); void *Middle(void *argument);
@@ -60,7 +62,7 @@ void *Low(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMCOND" TEST_NUMBER " ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
@@ -123,7 +125,7 @@ void *POSIX_Init(
int rc; int rc;
struct timeval tp; struct timeval tp;
puts( "\n\n*** POSIX TIME TEST PSXTMCOND" TEST_NUMBER " ***" ); TEST_BEGIN();
rc = gettimeofday(&tp, NULL); rc = gettimeofday(&tp, NULL);
rtems_test_assert( rc == 0 ); rtems_test_assert( rc == 0 );

View File

@@ -17,6 +17,8 @@
#include <pthread.h> #include <pthread.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMKEY 01";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
@@ -65,7 +67,7 @@ static void benchmark_pthread_key_delete(void)
void *POSIX_Init(void *argument) void *POSIX_Init(void *argument)
{ {
puts( "\n\n*** POSIX TIME TEST PSXTMKEY01 ***" ); TEST_BEGIN();
/*key creation, using NULL destructor*/ /*key creation, using NULL destructor*/
benchmark_pthread_key_create(); benchmark_pthread_key_create();
@@ -73,7 +75,7 @@ void *POSIX_Init(void *argument)
/* key deletion*/ /* key deletion*/
benchmark_pthread_key_delete(); benchmark_pthread_key_delete();
puts( "*** END OF POSIX TIME TEST PSXTMKEY01 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -17,6 +17,8 @@
#include <pthread.h> #include <pthread.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMKEY 02";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void benchmark_pthread_setspecific(void *value_p); void benchmark_pthread_setspecific(void *value_p);
@@ -70,7 +72,7 @@ void *POSIX_Init(
{ {
int status; int status;
puts( "\n\n*** POSIX TIME TEST PSXTMKEY02 ***" ); TEST_BEGIN();
/* create the key */ /* create the key */
status = pthread_key_create( &Key, NULL ); status = pthread_key_create( &Key, NULL );
@@ -84,7 +86,7 @@ void *POSIX_Init(
status = pthread_key_delete( Key ); status = pthread_key_delete( Key );
rtems_test_assert( status == 0 ); rtems_test_assert( status == 0 );
puts( "*** END OF POSIX TIME TEST PSXTMKEY02 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -19,6 +19,8 @@
#include <mqueue.h> #include <mqueue.h>
#include <signal.h> /* signal facilities */ #include <signal.h> /* signal facilities */
const char rtems_test_name[] = "PSXTMMQ 01";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
@@ -256,7 +258,7 @@ void *POSIX_Init(
void *argument void *argument
) )
{ {
puts( "\n\n*** POSIX TIME TEST PSXTMMQ01 ***" ); TEST_BEGIN();
/* create the first message queue READWRITE */ /* create the first message queue READWRITE */
benchmark_mq_open(1); benchmark_mq_open(1);
/* send message using first queue */ /* send message using first queue */
@@ -287,7 +289,7 @@ void *POSIX_Init(
/* closing the first queue */ /* closing the first queue */
benchmark_mq_close(1); benchmark_mq_close(1);
puts( "*** END OF POSIX TIME TEST PSXTMMQ01 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -17,6 +17,8 @@
#include <pthread.h> #include <pthread.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMMUTEX 01";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
@@ -65,12 +67,12 @@ void *POSIX_Init(
) )
{ {
puts( "\n\n*** POSIX TIME TEST PSXTMMUTEX01 ***" ); TEST_BEGIN();
test_mutex_create(); test_mutex_create();
test_mutex_destroy(); test_mutex_destroy();
puts( "*** END OF POSIX TIME TEST PSXTMMUTEX01 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -19,6 +19,8 @@
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
const char rtems_test_name[] = "PSXTMMUTEX 02";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Middle(void *argument); void *Middle(void *argument);
@@ -50,7 +52,7 @@ void *Low(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMMUTEX02 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
@@ -84,7 +86,7 @@ void *POSIX_Init(
int status; int status;
pthread_t threadId; pthread_t threadId;
puts( "\n\n*** POSIX TIME TEST PSXTMMUTEX02 ***" ); TEST_BEGIN();
for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) { for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) {
status = pthread_create( &threadId, NULL, Middle, NULL ); status = pthread_create( &threadId, NULL, Middle, NULL );

View File

@@ -17,6 +17,8 @@
#include <pthread.h> #include <pthread.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMMUTEX 03";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void benchmark_mutex_lock_available(void); void benchmark_mutex_lock_available(void);
@@ -133,7 +135,7 @@ void *POSIX_Init(
{ {
int status; int status;
puts( "\n\n*** POSIX TIME TEST PSXTMMUTEX03 ***" ); TEST_BEGIN();
/* /*
* Create the single Mutex used in all the test case * Create the single Mutex used in all the test case
@@ -160,7 +162,7 @@ void *POSIX_Init(
status = pthread_mutex_destroy( &MutexId ); status = pthread_mutex_destroy( &MutexId );
rtems_test_assert( !status ); rtems_test_assert( !status );
puts( "*** END OF POSIX TIME TEST PSXTMMUTEX03 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -19,6 +19,8 @@
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
const char rtems_test_name[] = "PSXTMMUTEX 04";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Middle(void *argument); void *Middle(void *argument);
@@ -50,7 +52,7 @@ void *Low(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMMUTEX04 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
@@ -84,7 +86,7 @@ void *POSIX_Init(
int status; int status;
pthread_t threadId; pthread_t threadId;
puts( "\n\n*** POSIX TIME TEST PSXTMMUTEX04 ***" ); TEST_BEGIN();
for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) { for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) {
status = pthread_create( &threadId, NULL, Middle, NULL ); status = pthread_create( &threadId, NULL, Middle, NULL );

View File

@@ -19,6 +19,8 @@
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
const char rtems_test_name[] = "PSXTMMUTEX 05";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Blocker(void *argument); void *Blocker(void *argument);
@@ -44,7 +46,7 @@ void *POSIX_Init(
pthread_t threadId; pthread_t threadId;
benchmark_timer_t end_time; benchmark_timer_t end_time;
puts( "\n\n*** POSIX TIME TEST PSXTMMUTEX05 ***" ); TEST_BEGIN();
status = pthread_create( &threadId, NULL, Blocker, NULL ); status = pthread_create( &threadId, NULL, Blocker, NULL );
rtems_test_assert( status == 0 ); rtems_test_assert( status == 0 );
@@ -82,7 +84,7 @@ void *POSIX_Init(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMMUTEX05 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;

View File

@@ -19,6 +19,8 @@
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
const char rtems_test_name[] = "PSXTMMUTEX 06";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Middle(void *argument); void *Middle(void *argument);
@@ -46,7 +48,7 @@ void *Low(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMMUTEX07 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
} }
@@ -80,7 +82,7 @@ void *POSIX_Init(
pthread_attr_t attr; pthread_attr_t attr;
struct sched_param param; struct sched_param param;
puts( "\n\n*** POSIX TIME TEST PSXTMMUTEX02 ***" ); TEST_BEGIN();
/* /*
* Deliberately create the mutex BEFORE the threads. This way the * Deliberately create the mutex BEFORE the threads. This way the

View File

@@ -17,6 +17,8 @@
#include <pthread.h> #include <pthread.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMMUTEX 07";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void test_mutex_setprioceiling(void); void test_mutex_setprioceiling(void);
@@ -70,7 +72,7 @@ void *POSIX_Init(
{ {
int status; int status;
puts( "\n\n*** POSIX TIME TEST PSXTMMUTEX07 ***" ); TEST_BEGIN();
/* create mutex*/ /* create mutex*/
status = pthread_mutex_init( &MutexId, NULL ); status = pthread_mutex_init( &MutexId, NULL );
rtems_test_assert( status == 0 ); rtems_test_assert( status == 0 );
@@ -83,7 +85,7 @@ void *POSIX_Init(
status = pthread_mutex_destroy( &MutexId ); status = pthread_mutex_destroy( &MutexId );
rtems_test_assert( status == 0 ); rtems_test_assert( status == 0 );
puts( "*** END OF POSIX TIME TEST PSXTMMUTEX07 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -15,6 +15,8 @@
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMNANOSLEEP 01";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
@@ -28,7 +30,7 @@ void *POSIX_Init(
sleepTime.tv_sec = 0; sleepTime.tv_sec = 0;
sleepTime.tv_nsec = 0; sleepTime.tv_nsec = 0;
puts( "\n\n*** POSIX TIME TEST PSXTMNANOSLEEP01 ***" ); TEST_BEGIN();
benchmark_timer_initialize(); benchmark_timer_initialize();
nanosleep( &sleepTime, (struct timespec *) NULL ); nanosleep( &sleepTime, (struct timespec *) NULL );
@@ -36,7 +38,7 @@ void *POSIX_Init(
put_time( "nanosleep: yield", end_time, 1, 0, 0 ); put_time( "nanosleep: yield", end_time, 1, 0, 0 );
puts( "*** END OF POSIX TIME TEST PSXTMNANOSLEEP01 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -17,6 +17,8 @@
#include <pthread.h> #include <pthread.h>
const char rtems_test_name[] = "PSXTMNANOSLEEP 02";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Middle(void *argument); void *Middle(void *argument);
@@ -38,7 +40,7 @@ void *Low(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMNANOSLEEP02 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
@@ -73,7 +75,7 @@ void *POSIX_Init(
remainder.tv_sec = 0; remainder.tv_sec = 0;
remainder.tv_nsec = 0; remainder.tv_nsec = 0;
puts( "\n\n*** POSIX TIME TEST PSXTMNANOSLEEP02 ***" ); TEST_BEGIN();
for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) { for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) {
status = pthread_create( &threadId, NULL, Middle, NULL ); status = pthread_create( &threadId, NULL, Middle, NULL );

View File

@@ -16,6 +16,8 @@
#include <pthread.h> #include <pthread.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMRWLOCK 01";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
@@ -223,7 +225,7 @@ void *POSIX_Init(
) )
{ {
puts( "\n\n*** POSIX TIME PSXTMRWLOCK 01 ***" ); TEST_BEGIN();
/* initializing rwlock */ /* initializing rwlock */
benchmark_pthread_rwlock_init(); benchmark_pthread_rwlock_init();
@@ -258,7 +260,7 @@ void *POSIX_Init(
/* destroying rwlock */ /* destroying rwlock */
benchmark_pthread_rwlock_destroy(); benchmark_pthread_rwlock_destroy();
puts( "*** END OF POSIX TIME PSXTMRWLOCK 01 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -19,6 +19,8 @@
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMRWLOCK 02";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Middle(void *argument); void *Middle(void *argument);
@@ -50,7 +52,7 @@ void *Low(
0 0
); );
puts( "*** END OF POSIX TIME PSXTMRWLOCK 02 TEST ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
@@ -85,7 +87,7 @@ void *POSIX_Init(
pthread_t threadId; pthread_t threadId;
pthread_rwlockattr_t attr; pthread_rwlockattr_t attr;
puts( "\n\n*** POSIX TIME PSXTMRWLOCK 02 TEST ***" ); TEST_BEGIN();
for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) { for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) {
status = pthread_create( &threadId, NULL, Middle, NULL ); status = pthread_create( &threadId, NULL, Middle, NULL );

View File

@@ -19,6 +19,8 @@
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMRWLOCK 03";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Middle(void *argument); void *Middle(void *argument);
@@ -51,7 +53,7 @@ void *Low(
0 0
); );
puts( "*** END OF POSIX TIME PSXTMRWLOCK 03 TEST ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
@@ -87,7 +89,7 @@ void *POSIX_Init(
pthread_t threadId; pthread_t threadId;
pthread_rwlockattr_t attr; pthread_rwlockattr_t attr;
puts( "\n\n*** POSIX TIME PSXTMRWLOCK 03 TEST ***" ); TEST_BEGIN();
for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) { for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) {
status = pthread_create( &threadId, NULL, Middle, NULL ); status = pthread_create( &threadId, NULL, Middle, NULL );

View File

@@ -19,6 +19,8 @@
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMRWLOCK 04";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Middle(void *argument); void *Middle(void *argument);
@@ -50,7 +52,7 @@ void *Low(
0 0
); );
puts( "*** END OF POSIX TIME PSXTMRWLOCK 04 TEST ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
@@ -86,7 +88,7 @@ void *POSIX_Init(
pthread_t threadId; pthread_t threadId;
pthread_rwlockattr_t attr; pthread_rwlockattr_t attr;
puts( "\n\n*** POSIX TIME PSXTMRWLOCK 04 TEST ***" ); TEST_BEGIN();
for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) { for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) {
status = pthread_create( &threadId, NULL, Middle, NULL ); status = pthread_create( &threadId, NULL, Middle, NULL );

View File

@@ -19,6 +19,8 @@
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMRWLOCK 05";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Middle(void *argument); void *Middle(void *argument);
@@ -51,7 +53,7 @@ void *Low(
0 0
); );
puts( "*** END OF POSIX TIME PSXTMRWLOCK 05 TEST ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
@@ -88,7 +90,7 @@ void *POSIX_Init(
pthread_t threadId; pthread_t threadId;
pthread_rwlockattr_t attr; pthread_rwlockattr_t attr;
puts( "\n\n*** POSIX TIME PSXTMRWLOCK 05 TEST ***" ); TEST_BEGIN();
for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) { for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) {
status = pthread_create( &threadId, NULL, Middle, NULL ); status = pthread_create( &threadId, NULL, Middle, NULL );

View File

@@ -19,6 +19,8 @@
#include "test_support.h" #include "test_support.h"
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
const char rtems_test_name[] = "PSXTMRWLOCK 06";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Blocker(void *argument); void *Blocker(void *argument);
@@ -45,7 +47,7 @@ void *POSIX_Init(
benchmark_timer_t end_time; benchmark_timer_t end_time;
pthread_rwlockattr_t attr; pthread_rwlockattr_t attr;
puts( "\n\n*** POSIX TIME TEST PSXTMRWLOCK 06 ***" ); TEST_BEGIN();
status = pthread_create( &threadId, NULL, Blocker, NULL ); status = pthread_create( &threadId, NULL, Blocker, NULL );
rtems_test_assert( status == 0 ); rtems_test_assert( status == 0 );
@@ -87,7 +89,7 @@ void *POSIX_Init(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMRWLOCK 06 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;

View File

@@ -19,6 +19,8 @@
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
const char rtems_test_name[] = "PSXTMRWLOCK 07";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Middle(void *argument); void *Middle(void *argument);
@@ -47,7 +49,7 @@ void *Low(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMRWLOCK 07 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
} }
@@ -84,7 +86,7 @@ void *POSIX_Init(
struct sched_param param; struct sched_param param;
pthread_rwlockattr_t rw_attr; pthread_rwlockattr_t rw_attr;
puts( "\n\n*** POSIX TIME TEST PSXTMRWLOCK 07 ***" ); TEST_BEGIN();
/* /*
* Deliberately create the lock BEFORE the threads. This way the * Deliberately create the lock BEFORE the threads. This way the

View File

@@ -19,6 +19,8 @@
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMSEM 01";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
@@ -164,7 +166,7 @@ static void benchmark_sem_close_second(void)
void *POSIX_Init(void *argument) void *POSIX_Init(void *argument)
{ {
puts( "\n\n*** POSIX TIME TEST PSXTMSEM01 ***" ); TEST_BEGIN();
/* creating unnamed semaphore */ /* creating unnamed semaphore */
benchmark_sem_init(); benchmark_sem_init();
@@ -187,7 +189,7 @@ void *POSIX_Init(void *argument)
benchmark_sem_close(false); benchmark_sem_close(false);
benchmark_sem_unlink("sem_unlink: deletes semaphore"); benchmark_sem_unlink("sem_unlink: deletes semaphore");
puts( "*** END OF POSIX TIME TEST PSXTMSEM01 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -19,6 +19,8 @@
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMSEM 02";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
@@ -125,7 +127,7 @@ static void benchmark_sem_trywait_not_available(void)
void *POSIX_Init(void *argument) void *POSIX_Init(void *argument)
{ {
int status; int status;
puts( "\n\n*** POSIX TIME TEST PSXTMSEM02 ***" ); TEST_BEGIN();
/* create the semaphore */ /* create the semaphore */
status = sem_init( &sem1, 0, 1 ); status = sem_init( &sem1, 0, 1 );
@@ -142,7 +144,7 @@ void *POSIX_Init(void *argument)
/* try to lock the semaphore, not available */ /* try to lock the semaphore, not available */
benchmark_sem_trywait_not_available(); benchmark_sem_trywait_not_available();
puts( "*** END OF POSIX TIME TEST PSXTMSEM02 ***" ); TEST_END();
/*Destroying the semaphore*/ /*Destroying the semaphore*/
status = sem_destroy(&sem1); status = sem_destroy(&sem1);

View File

@@ -21,6 +21,8 @@
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
const char rtems_test_name[] = "PSXTMSEM 03";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Middle(void *argument); void *Middle(void *argument);
@@ -54,7 +56,7 @@ void *Low(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMSEM03 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
@@ -85,7 +87,7 @@ void *POSIX_Init(
int status; int status;
pthread_t threadId; pthread_t threadId;
puts( "\n\n*** POSIX TIME TEST PSXTMSEM03 ***" ); TEST_BEGIN();
for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) { for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) {
status = pthread_create( &threadId, NULL, Middle, NULL ); status = pthread_create( &threadId, NULL, Middle, NULL );

View File

@@ -22,6 +22,8 @@
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
const char rtems_test_name[] = "PSXTMSEM 04";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Blocker(void *argument); void *Blocker(void *argument);
@@ -46,7 +48,7 @@ void *POSIX_Init(void *argument)
pthread_t threadId; pthread_t threadId;
benchmark_timer_t end_time; benchmark_timer_t end_time;
puts( "\n\n*** POSIX TIME TEST SEMAPHORE 04 ***" ); TEST_BEGIN();
status = pthread_create( &threadId, NULL, Blocker, NULL ); status = pthread_create( &threadId, NULL, Blocker, NULL );
rtems_test_assert( status == 0 ); rtems_test_assert( status == 0 );
@@ -85,7 +87,7 @@ void *POSIX_Init(void *argument)
0 0
); );
puts( "*** END OF POSIX TIME TEST SEMAPHORE 04 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;

View File

@@ -22,6 +22,8 @@
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
const char rtems_test_name[] = "PSXTMSEM 05";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Middle(void *argument); void *Middle(void *argument);
@@ -51,7 +53,7 @@ void *Low(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMSEM05 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
} }
@@ -87,7 +89,7 @@ void *POSIX_Init(
pthread_attr_t attr; pthread_attr_t attr;
struct sched_param param; struct sched_param param;
puts( "\n\n*** POSIX TIME TEST PSXTMSEM05 ***" ); TEST_BEGIN();
/* /*
* Deliberately create the semaphore BEFORE the threads. This way the * Deliberately create the semaphore BEFORE the threads. This way the

View File

@@ -17,6 +17,8 @@
#include <unistd.h> #include <unistd.h>
const char rtems_test_name[] = "PSXTMSLEEP 01";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
@@ -26,7 +28,7 @@ void *POSIX_Init(
{ {
benchmark_timer_t end_time; benchmark_timer_t end_time;
puts( "\n\n*** POSIX TIME TEST PSXTMSLEEP01 ***" ); TEST_BEGIN();
benchmark_timer_initialize(); benchmark_timer_initialize();
sleep(0); sleep(0);
@@ -40,7 +42,7 @@ void *POSIX_Init(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMSLEEP01 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -17,6 +17,8 @@
#include <pthread.h> #include <pthread.h>
const char rtems_test_name[] = "PSXTMSLEEP 02";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Middle(void *argument); void *Middle(void *argument);
@@ -38,7 +40,7 @@ void *Low(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMSLEEP02 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
@@ -60,7 +62,7 @@ void *POSIX_Init(
int status; int status;
pthread_t threadId; pthread_t threadId;
puts( "\n\n*** POSIX TIME TEST PSXTMSLEEP02 ***" ); TEST_BEGIN();
for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) { for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) {
status = pthread_create( &threadId, NULL, Middle, NULL ); status = pthread_create( &threadId, NULL, Middle, NULL );

View File

@@ -18,6 +18,8 @@
#include <pthread.h> #include <pthread.h>
const char rtems_test_name[] = "PSXTMTHREAD 01";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *TestThread(void *argument); void *TestThread(void *argument);
@@ -47,7 +49,7 @@ void *POSIX_Init(
void *argument void *argument
) )
{ {
puts( "\n\n*** POSIX TIME TEST PSXTMTHREAD01 ***" ); TEST_BEGIN();
rtems_time_test_measure_operation( rtems_time_test_measure_operation(
"pthread_create: no preempt", "pthread_create: no preempt",
@@ -58,7 +60,7 @@ void *POSIX_Init(
); );
puts( "*** END OF POSIX TIME TEST PSXTMTHREAD01 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -17,6 +17,8 @@
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMTHREAD 02";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void benchmark_pthread_create(void); void benchmark_pthread_create(void);
@@ -69,11 +71,11 @@ void *POSIX_Init(
) )
{ {
puts( "\n\n*** POSIX TIME TEST PSXTMTHREAD02 ***" ); TEST_BEGIN();
benchmark_pthread_create(); benchmark_pthread_create();
puts( "*** END OF POSIX TIME TEST PSXTMTHREAD02 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -19,6 +19,8 @@
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
const char rtems_test_name[] = "PSXTMTHREAD 03";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void *Middle(void *argument); void *Middle(void *argument);
@@ -48,7 +50,7 @@ void *Low(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMTHREAD03 ***" ); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
return NULL; return NULL;
} }
@@ -77,7 +79,7 @@ void *POSIX_Init(
int status; int status;
pthread_t threadId; pthread_t threadId;
puts( "\n\n*** POSIX TIME TEST PSXTMTHREAD03 ***" ); TEST_BEGIN();
for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) { for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) {
status = pthread_create( &threadId, NULL, Middle, NULL ); status = pthread_create( &threadId, NULL, Middle, NULL );

View File

@@ -17,6 +17,8 @@
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMTHREAD 04";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void benchmark_pthread_setschedparam(void); void benchmark_pthread_setschedparam(void);
void benchmark_pthread_getschedparam(void); void benchmark_pthread_getschedparam(void);
@@ -75,12 +77,12 @@ void *POSIX_Init(
) )
{ {
puts( "\n\n*** POSIX TIME TEST PSXTMTHREAD04 ***" ); TEST_BEGIN();
benchmark_pthread_getschedparam(); benchmark_pthread_getschedparam();
benchmark_pthread_setschedparam(); benchmark_pthread_setschedparam();
puts( "*** END OF POSIX TIME TEST PSXTMTHREAD04 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -18,6 +18,8 @@
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMTHREAD 05";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void benchmark_pthread_create(void); void benchmark_pthread_create(void);
@@ -64,7 +66,7 @@ void *test_thread(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMTHREAD05 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
//Empty thread used in pthread_create(). //Empty thread used in pthread_create().
return NULL; return NULL;
@@ -75,7 +77,7 @@ void *POSIX_Init(
) )
{ {
puts( "\n\n*** POSIX TIME TEST PSXTMTHREAD05 ***" ); TEST_BEGIN();
benchmark_pthread_setschedparam(); benchmark_pthread_setschedparam();
rtems_test_assert( 1 ); rtems_test_assert( 1 );

View File

@@ -19,6 +19,8 @@
#include <rtems/timerdrv.h> #include <rtems/timerdrv.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMTHREAD 06";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
void *POSIX_Init(void *argument); void *POSIX_Init(void *argument);
void benchmark_pthread_create(void); void benchmark_pthread_create(void);
@@ -66,7 +68,7 @@ void *test_thread(
0 0
); );
puts( "*** END OF POSIX TIME TEST PSXTMTHREAD06 ***" ); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);
//Empty thread used in pthread_create(). //Empty thread used in pthread_create().
return NULL; return NULL;
@@ -77,7 +79,7 @@ void *POSIX_Init(
) )
{ {
puts( "\n\n*** POSIX TIME TEST PSXTMTHREAD06 ***" ); TEST_BEGIN();
benchmark_pthread_setschedparam(); benchmark_pthread_setschedparam();
rtems_test_assert( 1 ); rtems_test_assert( 1 );