9fans archive / 1997 / 05 / 31 / prev next From: G. David Butler gdb@dbS... Subject: calling sleep() while holding lock() Date: Thu, 8 May 1997 09:04:18 -0500 It would seem to me that a process should not call sleep() holding a spinlock, even though that seems to be happening. I changed taslock to increment and decrement the hasspin flag instead of just setting it and clearing it. It is reasonable to have many locks. (There is also a problem with the lock being dropped before the hasspin was modified that I fixed. I also temporarly removed the hasspin clear from clock.c) I then added a print in sleep to print the pid and hasspin counter if hasspin > 0. It happens alot and pretty early in the boot phase. I'm doing this trying to find the cause of my earlier message about checksum errors on the ethernet. I am looking for places where spinlocks are being held for long times and next where interrupts are masked too long. Before I go much further, I wanted to check on this behavior. Thanks for any info. David Butler gdb@dbS...