From owner-freebsd-hackers Tue Nov 7 23:53:57 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id XAA26316 for hackers-outgoing; Tue, 7 Nov 1995 23:53:57 -0800 Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id XAA26310 for ; Tue, 7 Nov 1995 23:53:52 -0800 Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id HAA06456 for hackers@freebsd.org; Wed, 8 Nov 1995 07:49:00 GMT From: Michael Smith Message-Id: <199511080749.HAA06456@genesis.atrad.adelaide.edu.au> Subject: ioctl() question... To: hackers@freebsd.org Date: Wed, 8 Nov 1995 07:49:00 +0000 () MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 985 Sender: owner-hackers@freebsd.org Precedence: bulk A device-driver level question : I have some ioctls : struct buf { u_short count, timeout, status; u_short data[256]; } #define GETSTUFF _IOR('p', 15, struct buf) #define PUTSTUFF _IOW('p', 16, struct buf) #define PUTSTATUS _IOR('p', 17, int) Where PUTSTATUS gets the status of the last put operation. This is yucko and non-orthagonal, and I'd prefer to do #define PUTSTUFF _IOWR('p', 16, struct buf) but I'm ignorant of the relative merits wrt copyin/copyout time vs. syscall time. It's also possible that the data[] array may grow, although I'm trading off against read/write with that 8( -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and (GSM mobile) 041-122-496 [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] My car has "demand start" -Terry Lambert UNIX: live FreeBSD or die! [[