Changeset 30ceeaa in rtems


Ignore:
Timestamp:
Mar 17, 2007, 6:46:45 AM (13 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
508cd3a1
Parents:
d7c655d
Message:

2007-03-17 Ralf Corsépius <ralf.corsepius@…>

  • libcsupport/include/rtems/termiostypes.h, libcsupport/src/termios.c: Prefix linesw, struct linesw, nwlinesw with rtems_termios_*.
Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rd7c655d r30ceeaa  
    112007-03-17      Ralf Corsépius <ralf.corsepius@rtems.org>
    22
     3        * libcsupport/include/rtems/termiostypes.h,
     4        libcsupport/src/termios.c: Prefix linesw, struct linesw, nwlinesw
     5        with rtems_termios_*.
    36        * libnetworking/sys/conf.h: Remove linesw, struct linesw, nlinesw.
    47        (Clash with termiostypes.h - PR 1229).
  • cpukit/libcsupport/include/rtems/termiostypes.h

    rd7c655d r30ceeaa  
    132132};
    133133
    134 struct linesw {
     134struct rtems_termios_linesw {
    135135  int (*l_open) (struct rtems_termios_tty *tp);
    136136  int (*l_close)(struct rtems_termios_tty *tp);
     
    166166 * global hooks for line disciplines
    167167 */
    168 extern struct linesw linesw[];
    169 extern int nlinesw;
     168extern struct rtems_termios_linesw rtems_termios_linesw[];
     169extern int rtems_termios_nlinesw;
    170170
    171171#define TTYDISC         0               /* termios tty line discipline */
  • cpukit/libcsupport/src/termios.c

    rd7c655d r30ceeaa  
    6161          NULL, NULL,   NULL,   NULL }
    6262/*
    63  * FIXME: change linesw entries consistant with linesw entry usage...
    64  */
    65 struct  linesw linesw[MAXLDISC] =
     63 * FIXME: change rtems_termios_linesw entries consistant with rtems_termios_linesw entry usage...
     64 */
     65struct  rtems_termios_linesw rtems_termios_linesw[MAXLDISC] =
    6666{
    6767        NODISC(0),              /* 0- termios-built-in */
     
    7575};
    7676
    77 int     nlinesw = sizeof (linesw) / sizeof (linesw[0]);
     77int     rtems_termios_nlinesw = sizeof (rtems_termios_linesw) / sizeof (rtems_termios_linesw[0]);
    7878
    7979extern struct rtems_termios_tty *rtems_termios_ttyHead;
     
    365365                rtems_fatal_error_occurred (sc);
    366366        if (--tty->refcount == 0) {
    367                 if (linesw[tty->t_line].l_close != NULL) {
     367                if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
    368368                        /*
    369369                         * call discipline-specific close
    370370                         */
    371                         sc = linesw[tty->t_line].l_close(tty);
     371                        sc = rtems_termios_linesw[tty->t_line].l_close(tty);
    372372                }
    373373                else {
     
    526526        switch (args->command) {
    527527        default:
    528                 if (linesw[tty->t_line].l_ioctl != NULL) {
    529                         sc = linesw[tty->t_line].l_ioctl(tty,args);
     528                if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
     529                        sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
    530530                }
    531531                else {
     
    597597                 * close old line discipline
    598598                 */
    599                 if (linesw[tty->t_line].l_close != NULL) {
    600                         sc = linesw[tty->t_line].l_close(tty);
     599                if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
     600                        sc = rtems_termios_linesw[tty->t_line].l_close(tty);
    601601                }
    602602                tty->t_line=*(int*)(args->buffer);
     
    605605                 * open new line discipline
    606606                 */
    607                 if (linesw[tty->t_line].l_open != NULL) {
    608                         sc = linesw[tty->t_line].l_open(tty);
     607                if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
     608                        sc = rtems_termios_linesw[tty->t_line].l_open(tty);
    609609                }
    610610                break;
     
    756756        if (sc != RTEMS_SUCCESSFUL)
    757757                return sc;
    758         if (linesw[tty->t_line].l_write != NULL) {
    759                 sc = linesw[tty->t_line].l_write(tty,args);
     758        if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
     759                sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
    760760                rtems_semaphore_release (tty->osem);
    761761                return sc;
     
    10911091        if (sc != RTEMS_SUCCESSFUL)
    10921092                return sc;
    1093         if (linesw[tty->t_line].l_read != NULL) {
    1094                 sc = linesw[tty->t_line].l_read(tty,args);
     1093        if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
     1094                sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
    10951095                tty->tty_rcvwakeup = 0;
    10961096                rtems_semaphore_release (tty->isem);
     
    11471147        rtems_interrupt_level level;
    11481148
    1149         if (linesw[tty->t_line].l_rint != NULL) {
     1149        if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
    11501150          while (len--) {
    11511151            c = *buf++;
    1152             linesw[tty->t_line].l_rint(c,tty);
     1152            rtems_termios_linesw[tty->t_line].l_rint(c,tty);
    11531153          }
    11541154
     
    14171417                 * call any line discipline start function
    14181418                 */
    1419                 if (linesw[tty->t_line].l_start != NULL) {
    1420                         linesw[tty->t_line].l_start(tty);
     1419                if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
     1420                        rtems_termios_linesw[tty->t_line].l_start(tty);
    14211421                }
    14221422                return 0; /* nothing to output in IRQ... */
     
    14521452                         * call any line discipline start function
    14531453                         */
    1454                         if (linesw[tty->t_line].l_start != NULL) {
    1455                                 linesw[tty->t_line].l_start(tty);
     1454                        if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
     1455                                rtems_termios_linesw[tty->t_line].l_start(tty);
    14561456                        }
    14571457                        /*
Note: See TracChangeset for help on using the changeset viewer.