version 1.130, 2007/08/18 00:33:38 |
version 1.131.4.1, 2007/10/14 11:48:46 |
Line 1166 pool_do_put(struct pool *pp, void *v, st |
|
Line 1166 pool_do_put(struct pool *pp, void *v, st |
|
panic("pool_put: %s: page header missing", pp->pr_wchan); |
panic("pool_put: %s: page header missing", pp->pr_wchan); |
} |
} |
|
|
#ifdef LOCKDEBUG |
|
/* |
|
* Check if we're freeing a locked simple lock. |
|
*/ |
|
simple_lock_freecheck(pi, (char *)pi + pp->pr_size); |
|
#endif |
|
|
|
/* |
/* |
* Return to item list. |
* Return to item list. |
*/ |
*/ |
Line 1624 pool_reclaim(struct pool *pp) |
|
Line 1617 pool_reclaim(struct pool *pp) |
|
* Drain pools, one at a time. |
* Drain pools, one at a time. |
* |
* |
* Note, we must never be called from an interrupt context. |
* Note, we must never be called from an interrupt context. |
|
* |
|
* XXX Pool can disappear while draining. |
*/ |
*/ |
void |
void |
pool_drain(void *arg) |
pool_drain(void *arg) |
Line 2358 pool_allocator_alloc(struct pool *pp, in |
|
Line 2353 pool_allocator_alloc(struct pool *pp, in |
|
struct pool_allocator *pa = pp->pr_alloc; |
struct pool_allocator *pa = pp->pr_alloc; |
void *res; |
void *res; |
|
|
LOCK_ASSERT(!simple_lock_held(&pp->pr_slock)); |
|
|
|
res = (*pa->pa_alloc)(pp, flags); |
res = (*pa->pa_alloc)(pp, flags); |
if (res == NULL && (flags & PR_WAITOK) == 0) { |
if (res == NULL && (flags & PR_WAITOK) == 0) { |
/* |
/* |
Line 2380 pool_allocator_free(struct pool *pp, voi |
|
Line 2373 pool_allocator_free(struct pool *pp, voi |
|
{ |
{ |
struct pool_allocator *pa = pp->pr_alloc; |
struct pool_allocator *pa = pp->pr_alloc; |
|
|
LOCK_ASSERT(!simple_lock_held(&pp->pr_slock)); |
|
|
|
(*pa->pa_free)(pp, v); |
(*pa->pa_free)(pp, v); |
} |
} |
|
|