Changeset 8b3da13 in rtems-libbsd


Ignore:
Timestamp:
Jan 8, 2018, 12:55:36 PM (19 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5283630d2c9d40deb0183696d278e02644fe4326, bc2ba9a9cdc7381c2a4f2ae6ee303be636f31368
Children:
a0633c5
Parents:
327f4e1
git-author:
Sebastian Huber <sebastian.huber@…> (01/08/18 12:55:36)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/05/18 09:56:24)
Message:

termios: Update due to API changes

Update #2843.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/rtems/rtems-kernel-termioskqueuepoll.c

    r327f4e1 r8b3da13  
    155155        termios_selinfo *ts;
    156156        rtems_termios_tty *tty;
    157         rtems_status_code sc;
    158157
    159158        ts = arg;
    160159        tty = ts->tty;
    161160
    162         sc = rtems_semaphore_obtain(tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
    163         BSD_ASSERT(sc == RTEMS_SUCCESSFUL);
    164 
     161        rtems_mutex_lock(&tty->isem);
    165162        selwakeup(&ts->sel);
    166 
    167         sc = rtems_semaphore_release(tty->isem);
    168         BSD_ASSERT(sc == RTEMS_SUCCESSFUL);
     163        rtems_mutex_unlock(&tty->isem);
    169164}
    170165
     
    174169        termios_selinfo *ts;
    175170        rtems_termios_tty *tty;
    176         rtems_status_code sc;
    177171
    178172        ts = arg;
    179173        tty = ts->tty;
    180174
    181         sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
    182         BSD_ASSERT(sc == RTEMS_SUCCESSFUL);
    183 
     175        rtems_mutex_lock(&tty->osem);
    184176        selwakeup(&ts->sel);
    185 
    186         sc = rtems_semaphore_release(tty->osem);
    187         BSD_ASSERT(sc == RTEMS_SUCCESSFUL);
     177        rtems_mutex_unlock(&tty->osem);
    188178}
    189179
     
    230220        struct selinfo *sel;
    231221        rtems_termios_tty *tty;
    232         rtems_status_code sc;
    233222        int revents;
    234223
     
    240229                    termios_receive_wakeup);
    241230
    242                 sc = rtems_semaphore_obtain(tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
    243                 BSD_ASSERT(sc == RTEMS_SUCCESSFUL);
     231                rtems_mutex_lock(&tty->isem);
    244232
    245233                if (termios_can_read(tty)) {
     
    249237                }
    250238
    251                 sc = rtems_semaphore_release(tty->isem);
    252                 BSD_ASSERT(sc == RTEMS_SUCCESSFUL);
     239                rtems_mutex_unlock(&tty->isem);
    253240        }
    254241
     
    257244                    termios_transmit_wakeup);
    258245
    259                 sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
    260                 BSD_ASSERT(sc == RTEMS_SUCCESSFUL);
     246                rtems_mutex_lock(&tty->osem);
    261247
    262248                if (termios_can_write(tty)) {
     
    266252                }
    267253
    268                 sc = rtems_semaphore_release(tty->osem);
    269                 BSD_ASSERT(sc == RTEMS_SUCCESSFUL);
     254                rtems_mutex_unlock(&tty->osem);
    270255        }
    271256
Note: See TracChangeset for help on using the changeset viewer.