tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kernel_lock prememption


I would like to know if a thread holding kernel_lock which is a spinlock can be preempted or not ? 

The implementation of kernel_lock in kern_lock.c seems to suggests that it can be preempted because the it uses splvm which implies IPL_VM. So a thread holding kernel_lock can be interrupted by clock interrupt and then scheduler can put the thread to sleep. This behavior is contrary to the classic definition of spinlock.
Is my understanding correct ?


Home | Main Index | Thread Index | Old Index