Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Nov 1997 19:28:41 -0800 (PST)
From:      "Jamil J. Weatherbee" <jamil@trojanhorse.ml.org>
To:        hackers@freebsd.org
Subject:   vnode.h and IO_NDELAY (help!!)
Message-ID:  <Pine.BSF.3.96.971118192251.175A-100000@trojanhorse.ml.org>

next in thread | raw e-mail | index | archive | help

I can't find a single code fragment in any device driver that checks
ioflags in the read routine to see if IO_NDELAY is set.  My driver
implements two distinct read modes: blocking and non-blocking.  I need to
check the ioflags passed to the read routine. I assume i would just
#include <sys/vnode.h> and check up against IO_NDELAY, why can't I find
any examples in a device driver of this being done?  Am I going about the
whole problem the wrong way?

Specifically if a user issues a read on an aiox device opened with the
O_NONBLOCK flag, or later performs an fcntl on the descriptor to make it
non-blocking I want to detect that when they come into the read routine.
If the vnode is blocking, I am allowed to tsleep on the fifo to complete
the uio otherwise just get what is available and return.  Am I making some
grave mistake in how I am handling this???




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971118192251.175A-100000>