| version 1.158.2.2, 2009/05/04 08:13:48 |
version 1.158.2.3, 2009/09/16 13:38:01 |
| Line 69 __KERNEL_RCSID(0, "$NetBSD$"); |
|
| Line 69 __KERNEL_RCSID(0, "$NetBSD$"); |
|
| */ |
*/ |
| |
|
| /* List of all pools */ |
/* List of all pools */ |
| TAILQ_HEAD(,pool) pool_head = TAILQ_HEAD_INITIALIZER(pool_head); |
static TAILQ_HEAD(, pool) pool_head = TAILQ_HEAD_INITIALIZER(pool_head); |
| |
|
| /* Private pool for page header structures */ |
/* Private pool for page header structures */ |
| #define PHPOOL_MAX 8 |
#define PHPOOL_MAX 8 |
|
|
| pool_subsystem_init(void) |
pool_subsystem_init(void) |
| { |
{ |
| struct pool_allocator *pa; |
struct pool_allocator *pa; |
| __link_set_decl(pools, struct link_pool_init); |
|
| struct link_pool_init * const *pi; |
|
| |
|
| mutex_init(&pool_head_lock, MUTEX_DEFAULT, IPL_NONE); |
mutex_init(&pool_head_lock, MUTEX_DEFAULT, IPL_NONE); |
| cv_init(&pool_busy, "poolbusy"); |
cv_init(&pool_busy, "poolbusy"); |
| |
|
| __link_set_foreach(pi, pools) |
|
| pool_init((*pi)->pp, (*pi)->size, (*pi)->align, |
|
| (*pi)->align_offset, (*pi)->flags, (*pi)->wchan, |
|
| (*pi)->palloc, (*pi)->ipl); |
|
| |
|
| while ((pa = SLIST_FIRST(&pa_deferinitq)) != NULL) { |
while ((pa = SLIST_FIRST(&pa_deferinitq)) != NULL) { |
| KASSERT(pa->pa_backingmapptr != NULL); |
KASSERT(pa->pa_backingmapptr != NULL); |
| KASSERT(*pa->pa_backingmapptr != NULL); |
KASSERT(*pa->pa_backingmapptr != NULL); |