Messages in this thread | | | Date | Tue, 24 Oct 2006 21:54:34 -0400 (EDT) | From | "Robert P. J. Day" <> | Subject | so 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/
| |