forked from Bananymous/banan-os
The old SpinLockAsMutex was pretty confusing first of all. It also was causing the issue thats been around for maybe a year now which is the only consistently happening kernel panic. I've been pretty confused about this and finally figured out what was causing this. The main issue was that we were accidentally enabling interrupts when blocking a thread that passed SpinLockAsMutex from normally interrupt enabled context. This led to receiving IPI for thread unblock while we were actively blocking the thread. I'm very suprized this had't caused any more serious issues than occasional kernel panics :^)