summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2009-10-27 12:12:48 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2009-10-27 12:12:48 +0000
commit7dcba143fbc7a14bf4e3841b623de2596abbd16b (patch)
treec37b1f362114552b6537a7b1ff6e5ce2cb1449a8 /testsuites
parent2009-10-27 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-7dcba143fbc7a14bf4e3841b623de2596abbd16b.tar.bz2
Include "tmacros.h".
Misc. changes related to rtems_intervals.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/sptests/sp29/init.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/testsuites/sptests/sp29/init.c b/testsuites/sptests/sp29/init.c
index d13588ea2b..e6d40701e4 100644
--- a/testsuites/sptests/sp29/init.c
+++ b/testsuites/sptests/sp29/init.c
@@ -29,6 +29,8 @@ rtems_task Init (rtems_task_argument argument);
#include <stdio.h>
#include <stdlib.h>
+#include "tmacros.h"
+
rtems_interval ticksPerSecond;
rtems_task subtask(rtems_task_argument arg);
void startTask(rtems_id arg);
@@ -83,7 +85,7 @@ rtems_task Init (rtems_task_argument ignored)
ticksPerSecond = rtems_clock_get_ticks_per_second();
if (ticksPerSecond <= 0) {
- printf ("Invalid ticks per second: %lu\n", (unsigned long) ticksPerSecond);
+ printf ("Invalid ticks per second: %" PRIdrtems_interval "\n", ticksPerSecond);
exit (1);
}
sc = rtems_semaphore_create (rtems_build_name ('S', 'M', 'r', 'c'),
@@ -174,16 +176,16 @@ rtems_task Init (rtems_task_argument ignored)
startTask (semnorec);
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
for (i = 0 ; i < 5 ; i++) {
- int diff;
+ rtems_interval diff;
sc = rtems_semaphore_obtain (semnorec, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- diff = (int) (now - then);
+ diff = (now - then);
then = now;
if (sc != RTEMS_SUCCESSFUL)
printf ("%d: Failed to obtain non-recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
else if (diff < (int) (2 * ticksPerSecond))
- printf ("%d: Obtained obtain non-recursive-lock semaphore too quickly -- %d ticks not %d ticks\n", __LINE__, diff, (2 * ticksPerSecond) );
+ printf ("%d: Obtained obtain non-recursive-lock semaphore too quickly -- %" PRIdrtems_interval " ticks not %" PRIdrtems_interval " ticks\n", __LINE__, diff, (2 * ticksPerSecond) );
}
puts( "*** END OF TEST 29 ***" );