From: David Mosberger <davidm@napali.hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] _raw_write_trylock() missing
Date: Tue, 04 Mar 2003 19:57:53 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590709805960@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590709805809@msgid-missing>
>>>>> On Tue, 4 Feb 2003 15:18:22 +0100 (NFT), Joel GUILLET <Joel.Guillet@bull.net> said:
Joel> Here is an implementation of "_raw_write_trylock_ " needed for
Joel> preemption support with SMP. I tested it on a 2.5.59 kernel
Joel> with 2 Itaniums. It seems to work.
I included your change, after dropping the (unnecessary) clobber of r2
and and the label (final result is below). Let me know if you have
any issue with this.
Thanks,
--david
#define _raw_spin_trylock(x) \
({ \
register long result; \
\
__asm__ __volatile__ ( \
"mov ar.ccv=r0\n" \
";;\n" \
"cmpxchg4.acq %0=[%2],%1,ar.ccv\n" \
: "=r"(result) : "r"(1), "r"(&(x)->lock) : "ar.ccv", "memory"); \
(result = 0); \
})
prev parent reply other threads:[~2003-03-04 19:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-04 2:53 [Linux-ia64] _raw_write_trylock() missing Peter Chubb
2003-02-04 14:18 ` Joel GUILLET
2003-02-05 1:46 ` Ian Wienand
2003-02-05 8:39 ` Joel GUILLET
2003-03-04 19:57 ` David Mosberger [this message]
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=marc-linux-ia64-105590709805960@msgid-missing \
--to=davidm@napali.hpl.hp.com \
--cc=linux-ia64@vger.kernel.org \
/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