[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: interacting with serial driver



On Fri, Jun 09, 2000 at 03:09:36PM +0530, Kedar Patankar typed:
> > Well, the case is, i want to do, what "open" or "write" or "read" does at
> > the lowest level, just above the driver.
> 
> At the very core "open" just turns on the DTR on the serial port.
> "Write" essentially just does a outb(SERIAL_DATA_PORT) and a status check,
> and "read" is tricky. It will block you till enough chars are available
> (depending on whether you have non-blocking mode set in "open"), and when
> the serial interrupt occurs the driver will actually read the chars and
> put them in the buffer. Eventually waking up your prog when enough are
> accumulated.
> 

Can't select() be used for doing non-blocking reads ?

Kala