tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Anomalies while handling p_nstopchild count
On Oct 10, 3:27pm, campbell+netbsd-tech-kern%mumble.net@localhost (Taylor R Campbell) wrote:
-- Subject: Re: Anomalies while handling p_nstopchild count
| proc_lock may be held by another thread even if the caller is
| guaranteed not to hold it. The other thread may furthermore be
| waiting on p->p_lock, in which case acquiring p->p_lock here would
| lead to deadlock -- but mutex_tryenter would simply fail.
|
| The optimization is to optimistically assume nobody else is holding
| proc_lock and do mutex_tryenter. Otherwise, we back out and acquire
| both locks in the correct order.
Thanks, now I get it!
christos
Home |
Main Index |
Thread Index |
Old Index