From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: so what's so special about sema_init() for alpha?
Date: Tue, 24 Oct 2006 21:54:34 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0610242150460.28319@localhost.localdomain> (raw)
i'm still curious as to why the implementation for sema_init() for
the alpha can't be simplified as (allegedly) could all of the other
architecture sema_init() calls.
the relevant code from that semaphore.h is:
===========
static inline void sema_init(struct semaphore *sem, int val)
{
/*
* Logically,
* *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
* except that gcc produces better initializing by parts yet.
*/
atomic_set(&sem->count, val);
init_waitqueue_head(&sem->wait);
}
============
ok, so what means "produces better initializing"? would a direct
call to __SEMAPHORE_INITIALIZER() work or not? i'm just curious. if
it really makes a difference in this one case, i can always resubmit a
patch that simplifies all of the other cases except for this one.
rday
next reply other threads:[~2006-10-25 1:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-25 1:54 Robert P. J. Day [this message]
2006-10-27 11:25 ` Roman Zippel
2006-10-27 11:42 ` Robert P. J. Day
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=Pine.LNX.4.64.0610242150460.28319@localhost.localdomain \
--to=rpjday@mindspring.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®