> I'd like to know if dereferencing ``p_p'' is safe without holding the
> KERNEL_LOCK.

SCHED_LOCK is enough to access p_p->ps_threads,

The construct used to decide whether the process is multi-threaded
already appears twice in sys/kern¸ and your diff adds a third
instance. It is probably worth turning into a macro or an inline
function¸ to make sure there is no risk of the copies becoming
out-of-sync over time.

Reply via email to