Subject: Re: USB stack needs early review (Re: Someone should fix our USB stack...)
To: SODA Noriyuki <soda@sra.co.jp>
From: Reinoud Zandijk <reinoud@netbsd.org>
List: tech-kern
Date: 05/29/2007 13:01:20
--TRYliJ5NKNqkz5bu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, May 29, 2007 at 06:15:22PM +0900, SODA Noriyuki wrote:
> No.
> The spl(x) before tsleep() and the splfoo() after tsleep() are both
> redundant.
> 
> > How would otherwise the interrupt handler be able to enter the spl 
> > level/interrupt level needed to modify the value's :-) Or am i wrong in 
> > this and is tsleep() taking care of that in this situation?
> 
> Yes, you are wrong. ;-)
> As you suppose, tsleep() modifies current priority level to allow
> interrupts.  See the Xspllower call in sys/arch/i386/i386/locore.S,
> of netbsd-4 branch, for example.

Thanks for the tip! But i guess the tsleep() set the spl back to the level 
it entered? That would be good... hmm... have to scout my code now ;)

Thanks,
Reinoud


--TRYliJ5NKNqkz5bu
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)

iQEVAwUBRlwH9oKcNwBDyKpoAQJLCgf8DZZn7ZuwNWxJmgheK/BYAyp98iqI7QYg
XC39FeGTdoJJqpHYjbqzhvMOSSuu+Kemhpof6hIiJMItIe4nQepOhJdvEDEOs+DJ
5mZr2/CQRozux5PsCMcvn7wpfWQP8ShPMeDr6/+Jr8issY2VlOY5bPI9M/wLbt3z
L2bT1k5KRM+gxL4pIjRhz1rYShuWHokIv6hxcPcrcixqrr+n96/XM6KbUElP/c8H
o0AKbFZ2FuVvIZwXQqjUqcyweimz82MmczVShQIr1ATQ3b0iJ98XXPFc037iBSNL
2e0ruYbl5zy0H3doa0sz8pOcA9PJfEIOCFefvFZ/vnQ/yJKsCBlTYg==
=QUya
-----END PGP SIGNATURE-----

--TRYliJ5NKNqkz5bu--