Re: An idea for spin_lock_contested()
:Something like: :--gd->gd_curthread->td_critcount; :for (;;) { :if (spin->counta == 1) :continue; : :++gd->gd_curthread->td_critcount; :cpu_ccfence(); :if (atomic_swap_int(&spin->counta, 1) == 0
An idea for spin_lock_contested()
Hi, Currently spin_lock_quick() bumps td->td_critcount on entry, disabling preemption throughout an entire spinlocked cycle. This makes sense -- the preempting thread might try to take a spinlock the preempted thread held, which would lead to deadlock. It might be nice to allow preemption while wa