From 7b5948d4d220ad33864a7b60d8133809908b0d2e Mon Sep 17 00:00:00 2001 From: Christian Mauderer Date: Thu, 12 Aug 2021 09:51:55 +0200 Subject: 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 --- cpukit/include/rtems/termiostypes.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cpukit/include/rtems/termiostypes.h') diff --git a/cpukit/include/rtems/termiostypes.h b/cpukit/include/rtems/termiostypes.h index ef2c958271..5821d52775 100644 --- a/cpukit/include/rtems/termiostypes.h +++ b/cpukit/include/rtems/termiostypes.h @@ -367,6 +367,10 @@ typedef struct rtems_termios_tty { */ rtems_id rxTaskId; rtems_id txTaskId; + /* + * Information for the tx task how many characters have been dequeued. + */ + int txTaskCharsDequeued; /* * line discipline related stuff @@ -482,7 +486,7 @@ struct rtems_termios_linesw { int (*l_read )(struct rtems_termios_tty *tp,rtems_libio_rw_args_t *args); int (*l_write)(struct rtems_termios_tty *tp,rtems_libio_rw_args_t *args); int (*l_rint )(int c,struct rtems_termios_tty *tp); - int (*l_start)(struct rtems_termios_tty *tp); + int (*l_start)(struct rtems_termios_tty *tp,int len); int (*l_ioctl)(struct rtems_termios_tty *tp,rtems_libio_ioctl_args_t *args); int (*l_modem)(struct rtems_termios_tty *tp,int flags); }; -- cgit v1.2.3