summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/termios.c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2003-07-02 14:20:36 +0000
committerChris Johns <chrisj@rtems.org>2003-07-02 14:20:36 +0000
commit1f5d2baf0607dcf6c6f6fd4d8e887cbc94361b61 (patch)
tree406d4e90209e8cbf2e21a7bf44ab62bc552a0fdd /cpukit/libcsupport/src/termios.c
parentPatch from Victor V. Vengerov <vvv@oktet.ru> to remove Linux code. (diff)
downloadrtems-1f5d2baf0607dcf6c6f6fd4d8e887cbc94361b61.tar.bz2
Patch by Chris Johns <cjohns@cybertec.com.au> adding the rtems_termios_bufsize call.
Diffstat (limited to 'cpukit/libcsupport/src/termios.c')
-rw-r--r--cpukit/libcsupport/src/termios.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c
index 96eb92d509..031b5be4ce 100644
--- a/cpukit/libcsupport/src/termios.c
+++ b/cpukit/libcsupport/src/termios.c
@@ -67,15 +67,15 @@
/*
* The size of the cooked buffer
*/
-#define CBUFSIZE 256
+#define CBUFSIZE (rtems_termios_cbufsize)
/*
* The sizes of the raw message buffers.
* On most architectures it is quite a bit more
* efficient if these are powers of two.
*/
-#define RAW_INPUT_BUFFER_SIZE 128
-#define RAW_OUTPUT_BUFFER_SIZE 64
+#define RAW_INPUT_BUFFER_SIZE (rtems_termios_raw_input_size)
+#define RAW_OUTPUT_BUFFER_SIZE (rtems_termios_raw_output_size)
/* fields for "flow_ctrl" status */
#define FL_IREQXOF 1 /* input queue requests stop of incoming data */
@@ -113,6 +113,10 @@ extern struct rtems_termios_tty *rtems_termios_ttyHead;
extern struct rtems_termios_tty *rtems_termios_ttyTail;
extern rtems_id rtems_termios_ttyMutex;
+static int rtems_termios_cbufsize = 256;
+static int rtems_termios_raw_input_size = 128;
+static int rtems_termios_raw_output_size = 64;
+
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument);
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument);
/*
@@ -457,6 +461,17 @@ rtems_termios_close (void *arg)
return RTEMS_SUCCESSFUL;
}
+rtems_status_code rtems_termios_bufsize (
+ int cbufsize,
+ int raw_input,
+ int raw_output
+)
+{
+ rtems_termios_cbufsize = cbufsize;
+ rtems_termios_raw_input_size = raw_input;
+ rtems_termios_raw_output_size = raw_output;
+}
+
static void
termios_set_flowctrl(struct rtems_termios_tty *tty)
{
@@ -1063,10 +1078,8 @@ fillBufferQueue (struct rtems_termios_tty *tty)
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
- if (siproc (c, tty)) {
+ if (siproc (c, tty))
wait = 0;
- break; /* done */
- }
}
else {
siproc (c, tty);
@@ -1512,4 +1525,3 @@ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
}
}
}
-