so what's so special about sema_init() for alpha?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux