9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] odd rwakeup qunlock behaviour in 9vx
@ 2023-11-05  1:35 ibrahim via 9fans
  2023-11-08 21:08 ` ori
  0 siblings, 1 reply; 6+ messages in thread
From: ibrahim via 9fans @ 2023-11-05  1:35 UTC (permalink / raw)
  To: 9fans

[-- 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 --]

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

end of thread, other threads:[~2023-11-10  6:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-05  1:35 [9fans] odd rwakeup qunlock behaviour in 9vx ibrahim via 9fans
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

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