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 Tue, 13 Oct 2015, Robert Elz wrote:

<snip>

Paul's question really amounted to, I think, whether either the fact that
proc_lock will be held while p_waited is set to 0 would make a difference
(I can't see why that would really matter) or more likely, since the code
will become

		p->p_waited = 0;
		p->p_pptr->p_nstopchild++;
		mutex_exit(proc_lock);
		membar_producer();
		p->p_stat = SSTOP;

whether the mutex_exit() makes the membar_producer() redundant.  ...

Yes, the latter "translation" is what I was asking - is it redundant?


(Thanks for being such an excellent translator and bringing clarity to
my sometimes muddy questions!)



+------------------+--------------------------+-------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
+------------------+--------------------------+-------------------------+


Home | Main Index | Thread Index | Old Index