From: Anthony Martin <ality@pbrane.org>
To: 9front@9front.org
Subject: [9front] Re: commit b3a26fb633f4649fc202b77c0184184b756960e7
Date: Mon, 8 Apr 2024 16:30:09 -0700 [thread overview]
Message-ID: <ZhR-AdtKy7ksMRme@alice> (raw)
Perhaps I'm missing something but is it safe to call ready
outside of the p->rlock?
I thought it was a requirement for a Rendez to be kept
around by other means if there is a possibility that it may
be accessed by other proc. So isn't the Rendez on the stack
in semacquire the actual problem?
If I'm wrong, wouldn't it be easier to reason about if we
used Richard Miller's solution (from the comment above
wakeup)?
The key change is to zero r->p immediately after saving it
to p so the critical section involving r is just:
lock(r)
p = r->p
r->p = nil
unlock(r)
What do you think?
Cheers,
Anthony
P.S.
As an aside, I really dislike procinterrupt (a.k.a postnote
or swiproc). The asynchronous nature makes it difficult to
reason about the invariants in sleep and wakeup.
Has anyone experimented with alternative designs?
next reply other threads:[~2024-04-08 23:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-08 23:30 Anthony Martin [this message]
2024-04-09 1:35 ` cinap_lenrek
2024-04-09 1:43 ` cinap_lenrek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZhR-AdtKy7ksMRme@alice \
--to=ality@pbrane.org \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).