From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/alternative; boundary=Apple-Mail-734EEC2D-D002-4B40-A7E4-9CD984CFDC87 Mime-Version: 1.0 (1.0) From: "Fran. J Ballesteros" In-Reply-To: Date: Mon, 24 Jul 2017 21:13:04 +0200 Content-Transfer-Encoding: 7bit Message-Id: <431F6692-904D-4424-9036-C74FAB969B7C@lsub.org> References: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] double lock in proc.c Topicbox-Message-UUID: c05dac3a-ead9-11e9-9d60-3106f5b1d025 --Apple-Mail-734EEC2D-D002-4B40-A7E4-9CD984CFDC87 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable do you remember the proposal? thanks > El 24 jul 2017, a las 18:39, Erik Quanstrom escrib= i=C3=B3: >=20 > I had a discussion with Richard about this a few years ago. Richard was n= o longer convinced of the solution. at the time I agreed with his reasoning= . the comment should be changed. >=20 > - erik >=20 >=20 > On Jul 24, 2017 9:03 AM, Giacomo Tesio wrote: > In /sys/src/9/port/proc.c a comment state: >=20 > /* > * Expects that only one process can call wakeup for any given Rendez. > * We hold both locks to ensure that r->p and p->r remain consistent. > * Richard Miller has a better solution that doesn't require both to > * be held simultaneously, but I'm a paranoid - presotto. > */ >=20 > (see https://github.com/0intro/plan9/blob/master/sys/src/9/port/proc.c#L88= 2-L887) >=20 > I'd like to know a bit more about Miller's solution as I'd like to simplif= y postnote. > Any hint or source code? >=20 >=20 > Giacomo >=20 --Apple-Mail-734EEC2D-D002-4B40-A7E4-9CD984CFDC87 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
do you remember the proposa= l?
thanks

El 24 jul 2017, a las 18:39, Erik Quanstro= m <quanstro@quanstro.net>= escribi=C3=B3:

I had a discussion with Richard about this a few years ago.  Richard w= as no longer convinced of the solution.  at the time I agreed with his r= easoning.  the comment should be changed.

- erik


On Jul 24, 2017 9:03 AM, Giacomo= Tesio <giacomo@tesio.it> wrot= e:
In /sys/src/9/port/proc.c a comment state:

/*
* Expects that onl= y one process can call wakeup for any given Rendez.
* We hold both locks t= o ensure that r->p and p->r remain consistent.
* Richard Miller has= a better solution that doesn't require both to
* be held simultaneously,= but I'm a paranoid - presotto.
*/

(see https://github= .com/0intro/plan9/blob/master/sys/src/9/port/proc.c#L882-L887)

I'd like to know a bit more about Miller's solution as I'd like to simpl= ify postnote.
Any hint or source code?


<= /div>Giacomo

= --Apple-Mail-734EEC2D-D002-4B40-A7E4-9CD984CFDC87--