forked from Imagelibrary/rtems
@@ -1379,6 +1379,16 @@ static inline uint32_t rtems_libio_iop_flags( const rtems_libio_t *iop )
|
||||
return iop->flags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns true if this is a no delay iop, otherwise returns false.
|
||||
*
|
||||
* @param[in] iop The iop.
|
||||
*/
|
||||
static inline bool rtems_libio_iop_is_no_delay( const rtems_libio_t *iop )
|
||||
{
|
||||
return ( rtems_libio_iop_flags( iop ) & LIBIO_FLAGS_NO_DELAY ) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name External I/O Handlers
|
||||
*/
|
||||
|
||||
@@ -1230,7 +1230,7 @@ static uint32_t
|
||||
rtems_termios_write_tty (rtems_libio_t *iop, rtems_termios_tty *tty,
|
||||
const char *buf, uint32_t len)
|
||||
{
|
||||
bool wait = ((iop->flags & LIBIO_FLAGS_NO_DELAY) == 0);
|
||||
bool wait = !rtems_libio_iop_is_no_delay (iop);
|
||||
|
||||
if (tty->termios.c_oflag & OPOST) {
|
||||
uint32_t todo = len;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "pipe.h"
|
||||
|
||||
#define LIBIO_ACCMODE(_iop) (rtems_libio_iop_flags(_iop) & LIBIO_FLAGS_READ_WRITE)
|
||||
#define LIBIO_NODELAY(_iop) ((_iop)->flags & LIBIO_FLAGS_NO_DELAY)
|
||||
#define LIBIO_NODELAY(_iop) rtems_libio_iop_is_no_delay(_iop)
|
||||
|
||||
static rtems_id pipe_semaphore = RTEMS_ID_NONE;
|
||||
|
||||
|
||||
@@ -794,7 +794,7 @@ rtems_bsdnet_fcntl (rtems_libio_t *iop, int cmd)
|
||||
rtems_bsdnet_semaphore_release ();
|
||||
return EBADF;
|
||||
}
|
||||
if (iop->flags & LIBIO_FLAGS_NO_DELAY)
|
||||
if (rtems_libio_iop_is_no_delay(iop))
|
||||
so->so_state |= SS_NBIO;
|
||||
else
|
||||
so->so_state &= ~SS_NBIO;
|
||||
|
||||
Reference in New Issue
Block a user