From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Oliver Neukum <oliver@neukum.org>
Cc: jidong xiao <jidong.xiao@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [linux-kernel]Why there are so many struct rw_semaphore being defined?
Date: Wed, 04 Jul 2007 12:34:16 +0200 [thread overview]
Message-ID: <468B77A8.9020504@s5r6.in-berlin.de> (raw)
In-Reply-To: <200707041115.06233.oliver@neukum.org>
Oliver Neukum wrote:
> Am Mittwoch, 4. Juli 2007 schrieb jidong xiao:
>> I see struct rw_semaphore is defined in
>> include/linux/rwsem-spinlock.h,in the meanwhile, I also can find it in
>
> Quote:
>
> #ifndef _LINUX_RWSEM_H
> #error "please don't include linux/rwsem-spinlock.h directly, use linux/rwsem.h instead"
> #endif
>
>> include/asm-**/rwsem.h,for
>> example,include/asm-i386/rwsem.h,include/asm-x86_64/rwsem.h,why?which
>> one should be used?
>
> This structure is so important to performance that some architectures
> have version optimized to their features.
...but of course we generally include linux/rwsem.h instead of
architecture-specific header files. linux/rwsem.h will transparently
pull in the optimized variants for us. (It's evident from the source.)
--
Stefan Richter
-=====-=-=== -=== --=--
http://arcgraph.de/sr/
prev parent reply other threads:[~2007-07-04 10:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-04 9:07 [linux-kernel]Why there are so many struct rw_semaphore being defined? jidong xiao
2007-07-04 9:15 ` Oliver Neukum
2007-07-04 10:34 ` Stefan Richter [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=468B77A8.9020504@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=jidong.xiao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oliver@neukum.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