From: Nigel Roles ngr@symbionics.co.uk
Subject: [9fans] TAS
Date: Sat, 19 Jun 1999 10:20:42 +0100 [thread overview]
Message-ID: <19990619092042.TlH0KZLN3Nhnwukdyi17jLnK2lFbut20l0gf_sLSJCY@z> (raw)
Why implement as a call? Because inlining is not supported by the compiler,
and
anyway the instruction sequence has a very strong chance of being cached as
it is
used a lot, so performance is not really an issue.
Does this make it less atomic? No. The assembler instruction is just as
atomic as
it was before. This is all that matters.
-----Original Message-----
From: pip [mailto:pip@cpu.khimaira.com]
Sent: Friday, June 18, 1999 5:56 PM
To: 9fans@cse.psu.edu
Subject: [9fans] TAS
My brief perusal of the source seems to indicate that tas(), called in
sys/src/9/port/taslock.c, is implemented in the architecture specific l.s.
There it seems, we splhi then issue a TAS instruction. For the SPARC
architecture for example, it seems TAS maps onto a `swap' instruction,
going from the plan9 asm to the underlying V8 asm, or something along
those lines.
Why implement tas() as a function, rather than do what it does inline.
Does the additional overhead of doing a function call make this act less
atomic ?
next reply other threads:[~1999-06-19 9:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-19 9:20 Nigel [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-06-19 15:52 pip
1999-06-19 11:52 forsyth
1999-06-18 16:55 pip
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=19990619092042.TlH0KZLN3Nhnwukdyi17jLnK2lFbut20l0gf_sLSJCY@z \
--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).