Subject: CVS commit: syssrc
To: None <source-changes@netbsd.org>
From: Ross Harvey <ross@netbsd.org>
List: source-changes
Date: 03/16/2001 21:32:36
Module Name:	syssrc
Committed By:	ross
Date:		Fri Mar 16 19:32:35 UTC 2001

Modified Files:
	syssrc/sys/dev/pci/bktr: bktr_os.h

Log Message:
Sigh.

Revert the revert. Naturally, I considered OpenBSD and FreeBSD when I fixed
the incorrect use of the spl*() interface. The change I made is _required_
for both NetBSD _and_ OpenBSD, or the code won't even COMPILE except on
i386, and it is acceptable on FreeBSD. Your revert and mod rebroke it on
OpenBSD and tangled things up on NetBSD.  It made no difference on FreeBSD.

In particular, there are 2,895 uses of splx() within the FreeBSD kernel,
and only a mere 21, that's "twenty one" uses of intrmask_t, and those are
almost exclusively in the guts of the interrupt implementation, _not_ in
the _use_ of the exported spl*() functions.  It's perfectly OK to `int s
= spltty()' in a portable driver in FreeBSD.

For that matter, FreeBSD (-current at least) does not even *use* spl*()
any more and stubs them all out with inlines that do _nothing_ except return
0, making intrmask_t vs int _even less_ important there than it already
was.

I think it's great that you want to start hacking on the kernel, but do
note that this is certainly the most simple of the kernel interfaces. It
just gets worse from here. Be careful out there!


To generate a diff of this commit:
cvs rdiff -r1.4 -r1.5 syssrc/sys/dev/pci/bktr/bktr_os.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.