Subject: Re: WARNING: SPL NOT LOWERED ON SYSCALL 0 0 EXIT
To: None <tech-kern@netbsd.org>
From: Joerg Sonnenberger <joerg@britannica.bec.de>
List: tech-kern
Date: 08/13/2007 18:52:30
On Mon, Aug 13, 2007 at 06:34:02PM +0200, Joerg Sonnenberger wrote:
> extern void __cpu_simple_lock_init(__cpu_simple_lock_t *);
> @@ -80,11 +104,16 @@
> static __inline void
> __cpu_simple_lock(__cpu_simple_lock_t *lockp)
> {
> + int count = 100;
>
> while (x86_atomic_testset_b(lockp, __SIMPLELOCK_LOCKED)
> != __SIMPLELOCK_UNLOCKED) {
> do {
> x86_pause();
> + if (--count) {
Make this --count == 0.
> + mb_memory();
> + count = 100;
> + }
> } while (*lockp == __SIMPLELOCK_LOCKED);
> }
> __insn_barrier();