From owner-freebsd-hackers Sat Feb 1 16:45:28 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id QAA19793 for hackers-outgoing; Sat, 1 Feb 1997 16:45:28 -0800 (PST) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id QAA19784 for ; Sat, 1 Feb 1997 16:45:24 -0800 (PST) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id BAA07338; Sun, 2 Feb 1997 01:45:17 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.8.5/8.6.9) id BAA20831; Sun, 2 Feb 1997 01:42:52 +0100 (MET) Message-ID: 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... References: <199702012336.SAA12533@spoon.beta.com> X-Mailer: Mutt 0.55-PL10 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199702012336.SAA12533@spoon.beta.com>; from Brian J. McGovern on Feb 1, 1997 18:36:59 -0500 Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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. ;-)