From: David Howells <dhowells@redhat.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: bwatson@kahuna.cag.cpqcorp.net, marcelo@conectiva.com.br,
linux-kernel@vger.kernel.org, dhowells@redhat.com,
hch@caldera.de
Subject: Re: [PATCH] 2.4.18-pre9, trylock for read/write semaphores
Date: Wed, 13 Feb 2002 07:47:32 +0000 [thread overview]
Message-ID: <26100.1013586452@warthog.cambridge.redhat.com> (raw)
In-Reply-To: Message from Alan Cox <alan@lxorguk.ukuu.org.uk> of "Tue, 12 Feb 2002 23:29:29 GMT." <E16amMb-0003RQ-00@the-village.bc.nu>
> > + new = old + RWSEM_ACTIVE_READ_BIAS;
> > + if (cmpxchg(&sem->count, old, new) == old)
> > + return 1;
>
> cmpxchg isnt present on i386
This isn't actually relevant... <asm/rwsem.h> isn't actually used unless
CONFIG_RWSEM_GENERIC_SPINLOCK is turned off, which it isn't if the CPU type is
configured to "i386":
[arch/i386/config.in]
if [ "$CONFIG_M386" = "y" ]; then
define_bool CONFIG_X86_CMPXCHG n
define_bool CONFIG_X86_XADD n
define_int CONFIG_X86_L1_CACHE_SHIFT 4
define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
else
define_bool CONFIG_X86_WP_WORKS_OK y
define_bool CONFIG_X86_INVLPG y
define_bool CONFIG_X86_CMPXCHG y
define_bool CONFIG_X86_XADD y
define_bool CONFIG_X86_BSWAP y
define_bool CONFIG_X86_POPAD_OK y
define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
fi
[include/linux/rwsem.h]
#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK
#include <linux/rwsem-spinlock.h> /* use a generic implementation */
#else
#include <asm/rwsem.h> /* use an arch-specific implementation */
#endif
David
next prev parent reply other threads:[~2002-02-13 7:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-12 22:45 [PATCH] 2.4.18-pre9, trylock for read/write semaphores bwatson
2002-02-12 23:29 ` Alan Cox
2002-02-13 1:47 ` Brian J. Watson
2002-02-13 7:47 ` David Howells [this message]
2002-02-13 8:19 ` David Howells
2002-02-14 0:13 ` Brian J. Watson
-- strict thread matches above, loose matches on Subject: below --
2002-02-21 18:04 Kendrick M. Smith
2002-02-21 21:54 ` Brian J. Watson
2002-02-21 23:02 ` Kendrick M. Smith
2002-02-21 23:26 ` Brian J. Watson
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=26100.1013586452@warthog.cambridge.redhat.com \
--to=dhowells@redhat.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bwatson@kahuna.cag.cpqcorp.net \
--cc=hch@caldera.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.