9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "ibrahim via 9fans" <9fans@9fans.net>
To: 9fans <9fans@9fans.net>
Subject: [9fans] odd rwakeup qunlock behaviour in 9vx
Date: Sat, 4 Nov 2023 21:35:04 -0400	[thread overview]
Message-ID: <16991481040.88FDBb.122754@composer.9fans.topicbox.com> (raw)

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

I have a function chan_send in which :
chan_send (...) {
qlock()
rwakeup(...)
qunlock()
}

If two such chan_send functions are called without a "task-switch" 9vx crashes. A work around for this problem is to place a sleep(0) after qunlock to enforce a task-switch

chan_send(...) {
qlock()
rwakeup(...)
qunlock()
sleep(0)
}

This behaviour isn't documented anywhere. I'll test it next on bare metal with a real kernel to find out if this is only a 9vx problem.



------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T7a5bb3cde50a8a9a-Meba86a2cee63818883e31403
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

             reply	other threads:[~2023-11-05  1:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-05  1:35 ibrahim via 9fans [this message]
2023-11-08 21:08 ` ori
2023-11-08 23:42   ` ibrahim via 9fans
2023-11-09  3:16     ` Lucio De Re
2023-11-10  2:24       ` ibrahim via 9fans
2023-11-10  6:40         ` Lucio De Re

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=16991481040.88FDBb.122754@composer.9fans.topicbox.com \
    --to=9fans@9fans.net \
    /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).