From owner-freebsd-hackers Mon Jan 5 18:05:40 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.7/8.8.7) id SAA10978 for hackers-outgoing; Mon, 5 Jan 1998 18:05:40 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from word.smith.net.au (vh1.gsoft.com.au [203.38.152.122]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id SAA10960 for ; Mon, 5 Jan 1998 18:05:07 -0800 (PST) (envelope-from mike@word.smith.net.au) Received: from word (localhost [127.0.0.1]) by word.smith.net.au (8.8.8/8.8.5) with ESMTP id MAA00719; Tue, 6 Jan 1998 12:27:25 +1030 (CST) Message-Id: <199801060157.MAA00719@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: daniel_sobral@voga.com.br cc: hackers@FreeBSD.ORG Subject: Re: Device Driver In-reply-to: Your message of "Mon, 05 Jan 1998 18:10:54 -0300." <83256583.0073B33A.00@papagaio.voga.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 06 Jan 1998 12:27:24 +1030 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk > > More bugging^^Wquestions: > > * The excelent device driver squeleton creator shell happens to create a > file (called "nameio.h") a install it on /usr/include/sys, for the express > purpose of IOCTL defines. Now, many drivers use /usr/include/machine > instead. Which should I prefer? sys/sys is correct for machine-independant drivers, sys/i386/include is correct for i386-specific drivers. > * My device driver should be used mainly by other kernel routines. How > should I proceed? Is there a standard interface or something? You need to be more specific about this before it's possible to give a really useful answer. Look at the network drivers and disk drivers for two sorts of drivers that are used primarily by other kernel code. > * The $#*@*$ card needs timeouts from one to ten (!!!) seconds, and has no > IRQ, for reads and writes! Now, blocking a process is easy (I suppose -- I > haven't checked out how do it yet), but how should I proceed regarding the > procedures called by other parts of the kernel? It depends on the context of potential callers to your code. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\