[PATCH 22/23] Misc psxtmtests: Use uint32_t not long for end_time to match printf() format expectations
Joel Sherrill
joel.sherrill at oarcorp.com
Wed Sep 3 15:26:16 UTC 2014
---
testsuites/psxtmtests/psxtmcond01/init.c | 8 ++++----
testsuites/psxtmtests/psxtmcond02/init.c | 4 ++--
testsuites/psxtmtests/psxtmcond03/init.c | 2 +-
testsuites/psxtmtests/psxtmcond04/init.c | 8 ++++----
testsuites/psxtmtests/psxtmcond05/init.c | 4 ++--
testsuites/psxtmtests/psxtmcond06/init.c | 2 +-
testsuites/psxtmtests/psxtmcond08/init.c | 2 +-
testsuites/psxtmtests/psxtmthread02/init.c | 2 +-
testsuites/psxtmtests/psxtmthread04/init.c | 16 ++++++++--------
testsuites/psxtmtests/psxtmthread05/init.c | 3 ++-
testsuites/psxtmtests/psxtmthread06/init.c | 2 +-
11 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/testsuites/psxtmtests/psxtmcond01/init.c b/testsuites/psxtmtests/psxtmcond01/init.c
index 7f1f820..c4dd630 100644
--- a/testsuites/psxtmtests/psxtmcond01/init.c
+++ b/testsuites/psxtmtests/psxtmcond01/init.c
@@ -30,8 +30,8 @@ pthread_cond_t mycondvar;
void benchmark_create_cond_var(void)
{
- long end_time;
- int status;
+ uint32_t end_time;
+ int status;
benchmark_timer_initialize();
status = pthread_cond_init(&mycondvar, NULL);
@@ -49,8 +49,8 @@ void benchmark_create_cond_var(void)
void benchmark_destroy_cond_var(void)
{
- long end_time;
- int status;
+ uint32_t end_time;
+ int status;
benchmark_timer_initialize();
status = pthread_cond_destroy(&mycondvar);
diff --git a/testsuites/psxtmtests/psxtmcond02/init.c b/testsuites/psxtmtests/psxtmcond02/init.c
index 7621517..668bb43 100644
--- a/testsuites/psxtmtests/psxtmcond02/init.c
+++ b/testsuites/psxtmtests/psxtmcond02/init.c
@@ -26,8 +26,8 @@ pthread_cond_t CondID;
void benchmark_signal(void)
{
- long end_time;
- int status;
+ uint32_t end_time;
+ int status;
benchmark_timer_initialize();
diff --git a/testsuites/psxtmtests/psxtmcond03/init.c b/testsuites/psxtmtests/psxtmcond03/init.c
index f901878..795c8d4 100644
--- a/testsuites/psxtmtests/psxtmcond03/init.c
+++ b/testsuites/psxtmtests/psxtmcond03/init.c
@@ -52,7 +52,7 @@ void *POSIX_Init(
{
int status;
pthread_t threadId;
- long end_time;
+ uint32_t end_time;
struct sched_param param;
int policy;
diff --git a/testsuites/psxtmtests/psxtmcond04/init.c b/testsuites/psxtmtests/psxtmcond04/init.c
index eb28230..2c16dfa 100644
--- a/testsuites/psxtmtests/psxtmcond04/init.c
+++ b/testsuites/psxtmtests/psxtmcond04/init.c
@@ -33,10 +33,10 @@ void *Blocker(
)
{
- long end_time;
- struct sched_param param;
- int policy;
- int status;
+ uint32_t end_time;
+ struct sched_param param;
+ int policy;
+ int status;
status = pthread_mutex_lock(&MutexID);
rtems_test_assert( status == 0 );
diff --git a/testsuites/psxtmtests/psxtmcond05/init.c b/testsuites/psxtmtests/psxtmcond05/init.c
index 1e74c21..ab15fc3 100644
--- a/testsuites/psxtmtests/psxtmcond05/init.c
+++ b/testsuites/psxtmtests/psxtmcond05/init.c
@@ -26,8 +26,8 @@ pthread_cond_t CondID;
void benchmark_broadcast(void)
{
- long end_time;
- int status;
+ uint32_t end_time;
+ int status;
benchmark_timer_initialize();
status = pthread_cond_broadcast(&CondID);
diff --git a/testsuites/psxtmtests/psxtmcond06/init.c b/testsuites/psxtmtests/psxtmcond06/init.c
index 3717926..91bef6c 100644
--- a/testsuites/psxtmtests/psxtmcond06/init.c
+++ b/testsuites/psxtmtests/psxtmcond06/init.c
@@ -52,7 +52,7 @@ void *POSIX_Init(
void *argument
)
{
- long end_time;
+ uint32_t end_time;
int status;
int i;
pthread_t threadId;
diff --git a/testsuites/psxtmtests/psxtmcond08/init.c b/testsuites/psxtmtests/psxtmcond08/init.c
index 3da351c..49ad0d7 100644
--- a/testsuites/psxtmtests/psxtmcond08/init.c
+++ b/testsuites/psxtmtests/psxtmcond08/init.c
@@ -50,7 +50,7 @@ void *Low(
void *argument
)
{
- long end_time;
+ uint32_t end_time;
end_time = benchmark_timer_read();
diff --git a/testsuites/psxtmtests/psxtmthread02/init.c b/testsuites/psxtmtests/psxtmthread02/init.c
index 4357938..bafa2ac 100644
--- a/testsuites/psxtmtests/psxtmthread02/init.c
+++ b/testsuites/psxtmtests/psxtmthread02/init.c
@@ -53,7 +53,7 @@ void *thread(
void *argument
)
{
- long end_time;
+ uint32_t end_time;
end_time = benchmark_timer_read();
put_time(
diff --git a/testsuites/psxtmtests/psxtmthread04/init.c b/testsuites/psxtmtests/psxtmthread04/init.c
index 28e1833..dc1290c 100644
--- a/testsuites/psxtmtests/psxtmthread04/init.c
+++ b/testsuites/psxtmtests/psxtmthread04/init.c
@@ -26,10 +26,10 @@ void *POSIX_Init(void *argument);
void benchmark_pthread_getschedparam(void)
{
- long end_time;
- int status;
- int policy;
- struct sched_param param;
+ uint32_t end_time;
+ int status;
+ int policy;
+ struct sched_param param;
benchmark_timer_initialize();
status = pthread_getschedparam( pthread_self(), &policy, ¶m );
@@ -48,10 +48,10 @@ void benchmark_pthread_getschedparam(void)
void benchmark_pthread_setschedparam(void)
{
- long end_time;
- int status;
- int policy;
- struct sched_param param;
+ uint32_t end_time;
+ int status;
+ int policy;
+ struct sched_param param;
status = pthread_getschedparam( pthread_self(), &policy, ¶m );
rtems_test_assert( status == 0 );
diff --git a/testsuites/psxtmtests/psxtmthread05/init.c b/testsuites/psxtmtests/psxtmthread05/init.c
index 98346b6..f127663 100644
--- a/testsuites/psxtmtests/psxtmthread05/init.c
+++ b/testsuites/psxtmtests/psxtmthread05/init.c
@@ -54,7 +54,8 @@ void *test_thread(
void *argument
)
{
- long end_time;
+ uint32_t end_time;
+
sched_yield();
end_time = benchmark_timer_read();
diff --git a/testsuites/psxtmtests/psxtmthread06/init.c b/testsuites/psxtmtests/psxtmthread06/init.c
index 0a7ee34..3466a8d 100644
--- a/testsuites/psxtmtests/psxtmthread06/init.c
+++ b/testsuites/psxtmtests/psxtmthread06/init.c
@@ -53,7 +53,7 @@ void *test_thread(
void *argument
)
{
- long end_time;
+ uint32_t end_time;
/* switch to POSIX_Init */
sched_yield();
--
1.9.3
More information about the devel
mailing list