Discard the data cached in the serial interface (in-kernel) buffers.
- Returns
- *this
Definition at line 355 of file sttybuf.cpp.
References csdbg::util::dbg_warn(), m_devnode, csdbg::streambuf::m_handle, and unlikely.
Referenced by config(), and flush().
359 retval = tcflush(
m_handle, TCIOFLUSH);
361 while (
unlikely(retval < 0 && errno == EINTR) );
363 #if CSDBG_DBG_LEVEL & CSDBG_DBGL_WARNING
366 "failed to clear the buffers of serial interface '%s' (errno %d - %s)",
373 return const_cast<sttybuf&
> (*this);
sttybuf(const i8 *, u32=9600)
Object constructor.
i32 m_handle
Stream handle (descriptor)
static void dbg_warn(const i8 *,...)
Print a warning debug message on the standard error stream.
i8 * m_devnode
Device node file (devfs)
int i32
32-bit signed integer
#define unlikely(expr)
Offer a hint (negative) to the pipeline branch predictor.