![]() | |||||||||||||
Messages in this thread |
* Andrew Morton <akpm@osdl.org> wrote: > > for (i = 0; i < MAX_HRTIMER_BASES; i++, base++) > > - spin_lock_init(&base->lock); > > + spin_lock_init_static(&base->lock); > > } > > > > Perhaps the validator core's implementation of spin_lock_init() could > look at the address and work out if it's within the static storage > sections. yeah, but there are two cases: places where we want to 'unify' array locks into a single type, and places where we want to treat them separately. The case where we 'unify' is the more common one: locks embedded into hash-tables for example. So i went for annotating the ones that are rarer. There are 2 right now: scheduler, hrtimers, with the hrtimers one going away in the high-res-timers implementation. (we unified the hrtimers locks into a per-CPU lock) (there's also a kgdb annotation for -mm) perhaps the naming should be clearer? I had it named spin_lock_init_standalone() originally, then cleaned it up to be spin_lock_init_static(). Maybe the original name is better? Ingo - 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-06-23 10:11 [from the cache] ©2003-2008 | |||||||||||||