Changeset 7dcba14 in rtems


Ignore:
Timestamp:
Oct 27, 2009, 12:12:48 PM (10 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, master
Children:
749eae9
Parents:
ae218607
Message:

Include "tmacros.h".
Misc. changes related to rtems_intervals.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/sp29/init.c

    rae218607 r7dcba14  
    2929#include <stdio.h>
    3030#include <stdlib.h>
     31
     32#include "tmacros.h"
    3133
    3234rtems_interval ticksPerSecond;
     
    8486        ticksPerSecond = rtems_clock_get_ticks_per_second();
    8587        if (ticksPerSecond <= 0) {
    86                 printf ("Invalid ticks per second: %lu\n", (unsigned long) ticksPerSecond);
     88                printf ("Invalid ticks per second: %" PRIdrtems_interval "\n", ticksPerSecond);
    8789                exit (1);
    8890        }
     
    175177        rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
    176178        for (i = 0 ; i < 5 ; i++) {
    177                 int diff;
     179                rtems_interval diff;
    178180
    179181                sc = rtems_semaphore_obtain (semnorec, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
    180182                rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
    181                 diff = (int) (now - then);
     183                diff = (now - then);
    182184                then = now;
    183185                if (sc != RTEMS_SUCCESSFUL)
    184186                        printf ("%d: Failed to obtain non-recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
    185187                else if (diff < (int) (2 * ticksPerSecond))
    186                         printf ("%d: Obtained obtain non-recursive-lock semaphore too quickly -- %d ticks not %d ticks\n", __LINE__, diff, (2 * ticksPerSecond) );
     188                        printf ("%d: Obtained obtain non-recursive-lock semaphore too quickly -- %" PRIdrtems_interval " ticks not %" PRIdrtems_interval " ticks\n", __LINE__, diff, (2 * ticksPerSecond) );
    187189        }
    188190
Note: See TracChangeset for help on using the changeset viewer.