diff options
Diffstat (limited to 'cpukit/libcsupport/src/termios.c')
-rw-r--r-- | cpukit/libcsupport/src/termios.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c index 51f3ac8cce..22811b64e8 100644 --- a/cpukit/libcsupport/src/termios.c +++ b/cpukit/libcsupport/src/termios.c @@ -553,9 +553,8 @@ rtems_termios_ioctl (void *arg) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { - rtems_interval ticksPerSecond; - rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); - tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; + tty->vtimeTicks = tty->termios.c_cc[VTIME] * + rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; @@ -977,13 +976,13 @@ fillBufferPoll (struct rtems_termios_tty *tty) else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) - rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); + then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { if (tty->termios.c_cc[VTIME] && tty->ccount) { - rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); + now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } @@ -992,7 +991,7 @@ fillBufferPoll (struct rtems_termios_tty *tty) else { if (!tty->termios.c_cc[VTIME]) break; - rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); + now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } @@ -1004,7 +1003,7 @@ fillBufferPoll (struct rtems_termios_tty *tty) if (tty->ccount >= tty->termios.c_cc[VMIN]) break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) - rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); + then = rtems_clock_get_ticks_since_boot(); } } } |