Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Jan 1998 12:27:24 +1030
From:      Mike Smith <mike@smith.net.au>
To:        daniel_sobral@voga.com.br
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Device Driver 
Message-ID:  <199801060157.MAA00719@word.smith.net.au>
In-Reply-To: Your message of "Mon, 05 Jan 1998 18:10:54 -0300." <83256583.0073B33A.00@papagaio.voga.com.br> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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.  \\ 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801060157.MAA00719>