* [9fans] 'non-interruptable temporary' warning
@ 2005-04-04 17:58 Sam
2005-04-04 18:10 ` Russ Cox
0 siblings, 1 reply; 2+ messages in thread
From: Sam @ 2005-04-04 17:58 UTC (permalink / raw)
To: 9fans
Hello,
warning: ../port/devaoe.c:540 non-interruptable temporary
Line 540:
ah->lba0 = lba = f->lba;
f->lba and lba are vlongs, ah->lba0 is a uchar.
What is the compiler warning me against? I'm guessing
something about being interruptible in the middle of
accessing the vlong?
Cheers,
Sam
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [9fans] 'non-interruptable temporary' warning
2005-04-04 17:58 [9fans] 'non-interruptable temporary' warning Sam
@ 2005-04-04 18:10 ` Russ Cox
0 siblings, 0 replies; 2+ messages in thread
From: Russ Cox @ 2005-04-04 18:10 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
the compiler is warning you against its own laziness.
in this case it is using a global temporary to hold the
intermediate value of (lba = f->lba) while converting
it to uchar. if you had another thread running through
this code it would use the same temporary.
use
lba = f->lba;
ah->lba0 = lba;
russ
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-04 18:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-04 17:58 [9fans] 'non-interruptable temporary' warning Sam
2005-04-04 18:10 ` Russ Cox
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).