> > ilock() (pc/lock.c) calls splhi() and then calls lock(). If that lock were > contended, how would the system not stop? And on a UP system, if you're > inside an splhi() block, > why would you need to take an uncontended lock? > ilock is for locks that get used both in normal procs and in interrupt handlers. Using splhi makes sure that the interrupt handler does not get started on the same cpu while the proc holds the lock, which would cause a deadlock. If there were no interrupts involved, the lock would be managed with lock/unlock instead of ilock/iunlock. On a uniprocessor you could get away with splhi/splx instead of ilock/iunlock, but it's easier and more portable to program as if always on a multiprocessor. Russ