Changeset a803e04d in rtems


Ignore:
Timestamp:
Sep 5, 2013, 6:34:32 PM (6 years ago)
Author:
Gedare Bloom <gedare@…>
Branches:
4.11, master
Children:
8ee95e6
Parents:
74d35751
Message:

termios: check return value from semaphore obtain/release

Raise a fatal error in case of failure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/src/termios.c

    r74d35751 ra803e04d  
    971971   */
    972972  if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
    973     rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
     973    rtems_status_code sc;
     974    sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
     975    if (sc != RTEMS_SUCCESSFUL)
     976      rtems_fatal_error_occurred (sc);
    974977    i = iproc (c, tty);
    975     rtems_semaphore_release (tty->osem);
     978    sc = rtems_semaphore_release (tty->osem);
     979    if (sc != RTEMS_SUCCESSFUL)
     980      rtems_fatal_error_occurred (sc);
    976981  }
    977982  else {
Note: See TracChangeset for help on using the changeset viewer.