mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* so what's so special about sema_init() for alpha?
@ 2006-10-25  1:54 Robert P. J. Day
  2006-10-27 11:25 ` Roman Zippel
  0 siblings, 1 reply; 3+ messages in thread
From: Robert P. J. Day @ 2006-10-25  1:54 UTC (permalink / raw)
  To: Linux Kernel Mailing List


  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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-10-27 11:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-25  1:54 so what's so special about sema_init() for alpha? Robert P. J. Day
2006-10-27 11:25 ` Roman Zippel
2006-10-27 11:42   ` Robert P. J. Day

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®