forked from Imagelibrary/rtems
2011-10-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* psxtmbarrier01/init.c, psxtmbarrier02/init.c, psxtmbarrier03/init.c, psxtmkey01/init.c, psxtmkey02/init.c, psxtmmq01/init.c, psxtmmutex01/init.c, psxtmmutex02/init.c, psxtmmutex03/init.c, psxtmmutex04/init.c, psxtmmutex05/init.c, psxtmmutex06/init.c, psxtmmutex07/init.c, psxtmnanosleep01/init.c, psxtmnanosleep02/init.c, psxtmrwlock01/init.c, psxtmrwlock02/init.c, psxtmrwlock03/init.c, psxtmrwlock04/init.c, psxtmrwlock05/init.c, psxtmrwlock06/init.c, psxtmrwlock07/init.c, psxtmsem01/init.c, psxtmsem02/init.c, psxtmsem03/init.c, psxtmsem04/init.c, psxtmsem05/init.c, psxtmsleep01/init.c, psxtmsleep02/init.c, psxtmthread03/init.c: Use benchmark_timer_t for benchmark_timer values (Avoid 64bit arch issues).
This commit is contained in:
@@ -1,3 +1,18 @@
|
||||
2011-10-19 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* psxtmbarrier01/init.c, psxtmbarrier02/init.c, psxtmbarrier03/init.c,
|
||||
psxtmkey01/init.c, psxtmkey02/init.c, psxtmmq01/init.c,
|
||||
psxtmmutex01/init.c, psxtmmutex02/init.c, psxtmmutex03/init.c,
|
||||
psxtmmutex04/init.c, psxtmmutex05/init.c, psxtmmutex06/init.c,
|
||||
psxtmmutex07/init.c, psxtmnanosleep01/init.c, psxtmnanosleep02/init.c,
|
||||
psxtmrwlock01/init.c, psxtmrwlock02/init.c, psxtmrwlock03/init.c,
|
||||
psxtmrwlock04/init.c, psxtmrwlock05/init.c, psxtmrwlock06/init.c,
|
||||
psxtmrwlock07/init.c, psxtmsem01/init.c, psxtmsem02/init.c,
|
||||
psxtmsem03/init.c, psxtmsem04/init.c, psxtmsem05/init.c,
|
||||
psxtmsleep01/init.c, psxtmsleep02/init.c, psxtmthread03/init.c:
|
||||
Use benchmark_timer_t for benchmark_timer values (Avoid 64bit
|
||||
arch issues).
|
||||
|
||||
2011-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* psxtmsem03/init.c: Add HAVE_CONFIG_H.
|
||||
|
||||
@@ -22,7 +22,7 @@ pthread_barrier_t barrier;
|
||||
|
||||
void benchmark_pthread_barrier_init(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
pthread_barrierattr_t attr;
|
||||
|
||||
@@ -48,7 +48,7 @@ void benchmark_pthread_barrier_init(void)
|
||||
|
||||
void benchmark_pthread_barrier_destroy(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
|
||||
@@ -27,7 +27,7 @@ void *Low(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
/*
|
||||
* Now we have finished the thread startup overhead,
|
||||
|
||||
@@ -39,7 +39,7 @@ void *POSIX_Init(
|
||||
{
|
||||
int status;
|
||||
pthread_t threadId;
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
puts( "\n\n*** POSIX TIME TEST PSXTMBARRIER 03 ***" );
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ pthread_key_t Key;
|
||||
|
||||
void benchmark_pthread_key_create(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -43,7 +43,7 @@ void benchmark_pthread_key_create(void)
|
||||
|
||||
void benchmark_pthread_key_delete(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
|
||||
@@ -24,7 +24,7 @@ int Value1;
|
||||
|
||||
void benchmark_pthread_setspecific( void *value_p )
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -44,7 +44,7 @@ void benchmark_pthread_setspecific( void *value_p )
|
||||
|
||||
void benchmark_pthread_getspecific( void *expected )
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
void *value_p;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
|
||||
@@ -30,7 +30,7 @@ const char *q_name;
|
||||
|
||||
void benchmark_mq_open(int printable)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
struct mq_attr attr;
|
||||
|
||||
attr.mq_maxmsg = MQ_MAXMSG;
|
||||
@@ -54,7 +54,7 @@ void benchmark_mq_open(int printable)
|
||||
|
||||
void benchmark_mq_open_second(int printable)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
struct mq_attr attr;
|
||||
|
||||
attr.mq_maxmsg = MQ_MAXMSG;
|
||||
@@ -78,7 +78,7 @@ void benchmark_mq_open_second(int printable)
|
||||
|
||||
void benchmark_mq_close(int printable)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -98,7 +98,7 @@ void benchmark_mq_close(int printable)
|
||||
|
||||
void benchmark_mq_close_second(int printable)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -118,7 +118,7 @@ void benchmark_mq_close_second(int printable)
|
||||
|
||||
void benchmark_mq_unlink(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -137,7 +137,7 @@ void benchmark_mq_unlink(void)
|
||||
|
||||
void benchmark_mq_notify(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
struct sigevent event;
|
||||
|
||||
@@ -160,7 +160,7 @@ void benchmark_mq_notify(void)
|
||||
|
||||
void benchmark_mq_send(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
status = 9;
|
||||
@@ -180,7 +180,7 @@ void benchmark_mq_send(void)
|
||||
|
||||
void benchmark_mq_receive(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
unsigned int priority;
|
||||
int message[MQ_MAXMSG];
|
||||
@@ -202,7 +202,7 @@ void benchmark_mq_receive(void)
|
||||
|
||||
void benchmark_mq_timedsend(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
struct timespec timeout;
|
||||
|
||||
@@ -226,7 +226,7 @@ void benchmark_mq_timedsend(void)
|
||||
|
||||
void benchmark_mq_timedreceive(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
unsigned int priority;
|
||||
struct timespec timeout;
|
||||
|
||||
@@ -23,7 +23,7 @@ pthread_mutex_t MutexId;
|
||||
|
||||
void test_mutex_create(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -42,7 +42,7 @@ void test_mutex_create(void)
|
||||
|
||||
void test_mutex_destroy(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
|
||||
@@ -27,7 +27,7 @@ void *Low(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
uint32_t end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
/*
|
||||
* Now we have finished the thread startup overhead,
|
||||
|
||||
@@ -23,7 +23,7 @@ pthread_mutex_t MutexId;
|
||||
|
||||
void benchmark_mutex_lock_available(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -42,7 +42,7 @@ void benchmark_mutex_lock_available(void)
|
||||
|
||||
void benchmark_mutex_unlock_no_threads_waiting(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -61,7 +61,7 @@ void benchmark_mutex_unlock_no_threads_waiting(void)
|
||||
|
||||
void benchmark_mutex_trylock_available(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -81,7 +81,7 @@ void benchmark_mutex_trylock_available(void)
|
||||
|
||||
void benchmark_mutex_trylock_not_available(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -105,7 +105,7 @@ void benchmark_mutex_trylock_not_available(void)
|
||||
|
||||
void benchmark_mutex_timedlock_available(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
|
||||
@@ -27,7 +27,7 @@ void *Low(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
uint32_t end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
/*
|
||||
* Now we have finished the thread startup overhead,
|
||||
|
||||
@@ -40,7 +40,7 @@ void *POSIX_Init(
|
||||
{
|
||||
int status;
|
||||
pthread_t threadId;
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
puts( "\n\n*** POSIX TIME TEST PSXTMMUTEX05 ***" );
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ void *Low(
|
||||
)
|
||||
{
|
||||
int status;
|
||||
uint32_t end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
status = pthread_mutex_lock( &MutexId );
|
||||
end_time = benchmark_timer_read();
|
||||
|
||||
@@ -23,7 +23,7 @@ pthread_mutex_t MutexId;
|
||||
|
||||
void test_mutex_setprioceiling(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
int old_ceiling;
|
||||
|
||||
@@ -43,7 +43,7 @@ void test_mutex_setprioceiling(void)
|
||||
|
||||
void test_mutex_getprioceiling(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
int current_ceiling;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ void *POSIX_Init(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
struct timespec sleepTime;
|
||||
|
||||
sleepTime.tv_sec = 0;
|
||||
|
||||
@@ -23,7 +23,7 @@ void *Low(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
end_time = benchmark_timer_read();
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ pthread_rwlock_t rwlock;
|
||||
|
||||
void benchmark_pthread_rwlock_init(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
pthread_rwlockattr_t attr;
|
||||
|
||||
@@ -44,7 +44,7 @@ void benchmark_pthread_rwlock_init(void)
|
||||
|
||||
void benchmark_pthread_rwlock_rdlock(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -64,7 +64,7 @@ void benchmark_pthread_rwlock_rdlock(void)
|
||||
|
||||
void benchmark_pthread_rwlock_unlock(int print)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -84,7 +84,7 @@ void benchmark_pthread_rwlock_unlock(int print)
|
||||
|
||||
void benchmark_pthread_rwlock_tryrdlock(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -112,7 +112,7 @@ void benchmark_pthread_rwlock_tryrdlock(void)
|
||||
|
||||
void benchmark_pthread_rwlock_timedrdlock(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -132,7 +132,7 @@ void benchmark_pthread_rwlock_timedrdlock(void)
|
||||
|
||||
void benchmark_pthread_rwlock_wrlock(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -152,7 +152,7 @@ void benchmark_pthread_rwlock_wrlock(void)
|
||||
|
||||
void benchmark_pthread_rwlock_trywrlock(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -181,7 +181,7 @@ void benchmark_pthread_rwlock_trywrlock(void)
|
||||
|
||||
void benchmark_pthread_rwlock_timedwrlock(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -200,7 +200,7 @@ void benchmark_pthread_rwlock_timedwrlock(void)
|
||||
|
||||
void benchmark_pthread_rwlock_destroy(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
|
||||
@@ -27,7 +27,7 @@ void *Low(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
uint32_t end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
/*
|
||||
* Now we have finished the thread startup overhead,
|
||||
|
||||
@@ -28,7 +28,7 @@ void *Low(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
uint32_t end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
/*
|
||||
* Now we have finished the thread startup overhead,
|
||||
|
||||
@@ -27,7 +27,7 @@ void *Low(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
uint32_t end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
/*
|
||||
* Now we have finished the thread startup overhead,
|
||||
|
||||
@@ -28,7 +28,7 @@ void *Low(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
uint32_t end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
/*
|
||||
* Now we have finished the thread startup overhead,
|
||||
|
||||
@@ -40,7 +40,7 @@ void *POSIX_Init(
|
||||
{
|
||||
int status;
|
||||
pthread_t threadId;
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
pthread_rwlockattr_t attr;
|
||||
|
||||
puts( "\n\n*** POSIX TIME TEST PSXTMRWLOCK 06 ***" );
|
||||
|
||||
@@ -28,7 +28,7 @@ void *Low(
|
||||
)
|
||||
{
|
||||
int status;
|
||||
uint32_t end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
/* write locking */
|
||||
status = pthread_rwlock_wrlock(&rwlock);
|
||||
|
||||
@@ -29,7 +29,7 @@ sem_t *n_sem2;
|
||||
|
||||
void benchmark_sem_init(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -48,7 +48,7 @@ void benchmark_sem_init(void)
|
||||
|
||||
void benchmark_sem_destroy(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -67,7 +67,7 @@ void benchmark_sem_destroy(void)
|
||||
|
||||
void benchmark_sem_open(bool report_time)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
n_sem1 = sem_open( "sem1", O_CREAT, 0777, 1 );
|
||||
@@ -86,7 +86,7 @@ void benchmark_sem_open(bool report_time)
|
||||
|
||||
void benchmark_sem_close(bool report_time)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -107,7 +107,7 @@ void benchmark_sem_close(bool report_time)
|
||||
|
||||
void benchmark_sem_unlink(const char *message)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -126,7 +126,7 @@ void benchmark_sem_unlink(const char *message)
|
||||
|
||||
void benchmark_sem_open_second(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
n_sem2 = sem_open( "sem1", O_EXCL, 0777, 1 );
|
||||
@@ -143,7 +143,7 @@ void benchmark_sem_open_second(void)
|
||||
|
||||
void benchmark_sem_close_second(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
|
||||
@@ -26,7 +26,7 @@ sem_t *n_sem1;
|
||||
|
||||
void benchmark_sem_getvalue(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
int value;
|
||||
|
||||
@@ -46,7 +46,7 @@ void benchmark_sem_getvalue(void)
|
||||
|
||||
void benchmark_sem_wait(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -65,7 +65,7 @@ void benchmark_sem_wait(void)
|
||||
|
||||
void benchmark_sem_post(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -84,7 +84,7 @@ void benchmark_sem_post(void)
|
||||
|
||||
void benchmark_sem_trywait_available(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
@@ -103,7 +103,7 @@ void benchmark_sem_trywait_available(void)
|
||||
|
||||
void benchmark_sem_trywait_not_available(void)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
|
||||
@@ -31,7 +31,7 @@ void *Low(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
/*
|
||||
* Now we have finished the thread startup overhead,
|
||||
|
||||
@@ -42,7 +42,7 @@ void *POSIX_Init(void *argument)
|
||||
{
|
||||
int status;
|
||||
pthread_t threadId;
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
puts( "\n\n*** POSIX TIME TEST SEMAPHORE 04 ***" );
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ void *Low(
|
||||
)
|
||||
{
|
||||
int status;
|
||||
uint32_t end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
status = sem_wait(&sem1); /* semaphore blocks */
|
||||
end_time = benchmark_timer_read();
|
||||
|
||||
@@ -23,7 +23,7 @@ void *POSIX_Init(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
puts( "\n\n*** POSIX TIME TEST PSXTMSLEEP01 ***" );
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ void *Low(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
long end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
end_time = benchmark_timer_read();
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ void *Low(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
uint32_t end_time;
|
||||
benchmark_timer_t end_time;
|
||||
|
||||
/*
|
||||
* Now we have finished the thread startup overhead,
|
||||
|
||||
Reference in New Issue
Block a user