diff options
author | Christian Mauderer <christian.mauderer@embedded-brains.de> | 2021-08-12 09:51:55 +0200 |
---|---|---|
committer | Christian Mauderer <christian.mauderer@embedded-brains.de> | 2022-02-10 09:07:26 +0100 |
commit | 7b5948d4d220ad33864a7b60d8133809908b0d2e (patch) | |
tree | 1bf85909962d28b96d57bac0e3fd869f2be0a7aa /cpukit/libcsupport/src | |
parent | cpukit/microblaze: Simplify dispatch assembly (diff) | |
download | rtems-7b5948d4d220ad33864a7b60d8133809908b0d2e.tar.bz2 |
termios: Pass number of sent chars to l_start
At the moment the line discipline start function (l_start) has no
possibility to get feedback about the number of characters that have
been sent. This patch passes that information via an additional
parameter.
The change might trigger a warning on existing code because of a pointer
mismatch but it shouldn't break it. An existing function with the old
API will just ignore the additional parameter.
Update #4493
Diffstat (limited to 'cpukit/libcsupport/src')
-rw-r--r-- | cpukit/libcsupport/src/termios.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c index 829c2bf158..4a4a7e77ac 100644 --- a/cpukit/libcsupport/src/termios.c +++ b/cpukit/libcsupport/src/termios.c @@ -1969,6 +1969,7 @@ rtems_termios_dequeue_characters (void *ttyp, int len) /* * send wake up to transmitter task */ + tty->txTaskCharsDequeued = len; sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); @@ -1980,7 +1981,7 @@ rtems_termios_dequeue_characters (void *ttyp, int len) * call PPP line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { - rtems_termios_linesw[tty->t_line].l_start(tty); + rtems_termios_linesw[tty->t_line].l_start(tty, len); } return 0; /* nothing to output in IRQ... */ } @@ -2015,7 +2016,7 @@ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { - rtems_termios_linesw[tty->t_line].l_start(tty); + rtems_termios_linesw[tty->t_line].l_start(tty, tty->txTaskCharsDequeued); if (tty->t_line == PPPDISC) { /* |