Re: [PATCH 15/17] commit-slab: provide a static initializer

2014-06-12 Thread Junio C Hamano
Jeff King p...@peff.net writes: Callers currently must use init_foo_slab() at runtime before accessing a slab. For global slabs, it's much nicer if we can initialize them in BSS, so that each user does not have to add code to check-and-initialize. Signed-off-by: Jeff King p...@peff.net ---

Re: [PATCH 15/17] commit-slab: provide a static initializer

2014-06-12 Thread Jeff King
On Thu, Jun 12, 2014 at 11:15:49AM -0700, Junio C Hamano wrote: Why do we need an initialiser at this point (in other words, how have other existing slab users coped without having one)? I think they call init_*_slab() when the slab is needed/used the first time (e.g. it is not even worth

[PATCH 15/17] commit-slab: provide a static initializer

2014-06-10 Thread Jeff King
Callers currently must use init_foo_slab() at runtime before accessing a slab. For global slabs, it's much nicer if we can initialize them in BSS, so that each user does not have to add code to check-and-initialize. Signed-off-by: Jeff King p...@peff.net --- There was no comment on this one in