From owner-freebsd-hackers Tue Nov 18 19:28:58 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id TAA21293 for hackers-outgoing; Tue, 18 Nov 1997 19:28:58 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from trojanhorse.ml.org (mdean.vip.best.com [206.86.94.101]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id TAA21287 for ; Tue, 18 Nov 1997 19:28:55 -0800 (PST) (envelope-from jamil@trojanhorse.ml.org) Received: from localhost (jamil@localhost) by trojanhorse.ml.org (8.8.8/8.8.5) with SMTP id TAA00180 for ; Tue, 18 Nov 1997 19:28:42 -0800 (PST) Date: Tue, 18 Nov 1997 19:28:41 -0800 (PST) From: "Jamil J. Weatherbee" To: hackers@freebsd.org Subject: vnode.h and IO_NDELAY (help!!) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 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???