lkml.org 
[lkml]   [2006]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectso what's so special about sema_init() for alpha?

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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-25 03:59    [W:0.063 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site