9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] double lock in proc.c
@ 2017-07-24 16:03 Giacomo Tesio
  2017-07-24 16:39 ` Erik Quanstrom
  0 siblings, 1 reply; 5+ messages in thread
From: Giacomo Tesio @ 2017-07-24 16:03 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 537 bytes --]

In /sys/src/9/port/proc.c a comment state:

/*
* 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.
*/

(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 simplify
postnote.
Any hint or source code?


Giacomo

[-- Attachment #2: Type: text/html, Size: 750 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-25 22:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-24 16:03 [9fans] double lock in proc.c Giacomo Tesio
2017-07-24 16:39 ` Erik Quanstrom
2017-07-24 19:13   ` Fran. J Ballesteros
2017-07-25 18:51     ` Richard Miller
2017-07-25 22:23       ` David du Colombier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).