Changeset 1f5d2ba in rtems


Ignore:
Timestamp:
Jul 2, 2003, 2:20:36 PM (18 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
8ebf2e4d
Parents:
c125425
Message:

Patch by Chris Johns <cjohns@…> adding the rtems_termios_bufsize call.

Location:
cpukit/libcsupport
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/ChangeLog

    rc125425 r1f5d2ba  
     12003-07-02      Chris Johns <cjohns@cybertec.com.au>
     2        * include/rtems/libio.h, src/termios.c: Patch by Chris Johns
     3        <cjohns@cybertec.com.au> adding the rtems_termios_bufsize call.
     4       
    152003-05-30      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    26
  • cpukit/libcsupport/include/rtems/libio.h

    rc125425 r1f5d2ba  
    555555void rtems_termios_initialize (void);
    556556
     557/*
     558 * CCJ: Change before opening a tty. Newer code from Eric is coming
     559 * so extra work to handle an open tty is not worth it. If the tty
     560 * is open, close then open it again.
     561 */
     562rtems_status_code rtems_termios_bufsize (
     563  int cbufsize,     /* cooked buffer size */
     564  int raw_input,    /* raw input buffer size */
     565  int raw_output    /* raw output buffer size */
     566);
     567
    557568rtems_status_code rtems_termios_open (
    558569  rtems_device_major_number      major,
  • cpukit/libcsupport/src/termios.c

    rc125425 r1f5d2ba  
    6868 * The size of the cooked buffer
    6969 */
    70 #define CBUFSIZE        256
     70#define CBUFSIZE        (rtems_termios_cbufsize)
    7171
    7272/*
     
    7575 * efficient if these are powers of two.
    7676 */
    77 #define RAW_INPUT_BUFFER_SIZE   128
    78 #define RAW_OUTPUT_BUFFER_SIZE  64
     77#define RAW_INPUT_BUFFER_SIZE   (rtems_termios_raw_input_size)
     78#define RAW_OUTPUT_BUFFER_SIZE  (rtems_termios_raw_output_size)
    7979
    8080/* fields for "flow_ctrl" status */
     
    113113extern struct rtems_termios_tty *rtems_termios_ttyTail;
    114114extern rtems_id rtems_termios_ttyMutex;
     115
     116static int rtems_termios_cbufsize = 256;
     117static int rtems_termios_raw_input_size = 128;
     118static int rtems_termios_raw_output_size = 64;
    115119
    116120static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument);
     
    456460        rtems_semaphore_release (rtems_termios_ttyMutex);
    457461        return RTEMS_SUCCESSFUL;
     462}
     463
     464rtems_status_code rtems_termios_bufsize (
     465  int cbufsize,
     466  int raw_input,
     467  int raw_output
     468)
     469{
     470  rtems_termios_cbufsize        = cbufsize;
     471  rtems_termios_raw_input_size  = raw_input;
     472  rtems_termios_raw_output_size = raw_output;
    458473}
    459474
     
    10641079                        /* continue processing new character */
    10651080                        if (tty->termios.c_lflag & ICANON) {
    1066                                 if  (siproc (c, tty)) {
     1081                                if  (siproc (c, tty))
    10671082                                        wait = 0;
    1068                break; /* done */
    1069             }
    10701083                        }
    10711084                        else {
     
    15131526        }
    15141527}
    1515 
Note: See TracChangeset for help on using the changeset viewer.