Date: Sun, 2 Feb 1997 01:42:50 +0100 From: j@uriah.heep.sax.de (J Wunsch) To: mcgovern@spoon.beta.com (Brian J. McGovern) Cc: hackers@FreeBSD.ORG Subject: Re: Device driver help needed... Message-ID: <Mutt.19970202014250.j@uriah.heep.sax.de> In-Reply-To: <199702012336.SAA12533@spoon.beta.com>; from Brian J. McGovern on Feb 1, 1997 18:36:59 -0500 References: <199702012336.SAA12533@spoon.beta.com>
next in thread | previous in thread | raw e-mail | index | archive | help
As Brian J. McGovern wrote: > struct uio > { > int uio_resid; /* Length of read request (?) */ The residual, the amount that's still to transfer. If you leave something here on return, this indicates a short read/write. I think leaving the entire amount of data here indicates EOF on write. > enum uio_seg uio_segflg; /* I assume a segment of some kind, but I > can only find reference to UIO_SYSSPACE */ ...or UIO_USERSPACE. Describes the origin/destination of the data. IIRC, depending on this value, uiomove(9) decides whether it can memcpy() the stuff or needs to copyin()/copyout() it. > struct proc *uio_procp; /* No idea, but I've seen it set to curproc */ Certainly the associated process. Probably useful in an SMP environment, must be setup by the caller. curproc is an ugly thing in an SMP environment, since there are multiple current processes. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Mutt.19970202014250.j>