9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] Re: commit b3a26fb633f4649fc202b77c0184184b756960e7
@ 2024-04-08 23:30 Anthony Martin
  2024-04-09  1:35 ` cinap_lenrek
  2024-04-09  1:43 ` cinap_lenrek
  0 siblings, 2 replies; 3+ messages in thread
From: Anthony Martin @ 2024-04-08 23:30 UTC (permalink / raw)
  To: 9front

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?

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

end of thread, other threads:[~2024-04-09  1:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-08 23:30 [9front] Re: commit b3a26fb633f4649fc202b77c0184184b756960e7 Anthony Martin
2024-04-09  1:35 ` cinap_lenrek
2024-04-09  1:43 ` cinap_lenrek

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).