| version 1.57, 2001/05/13 17:17:35 |
version 1.58, 2001/06/05 04:40:39 |
| Line 592 pool_get(struct pool *pp, int flags) |
|
| Line 592 pool_get(struct pool *pp, int flags) |
|
| if (__predict_false(curproc == NULL && doing_shutdown == 0 && |
if (__predict_false(curproc == NULL && doing_shutdown == 0 && |
| (flags & PR_WAITOK) != 0)) |
(flags & PR_WAITOK) != 0)) |
| panic("pool_get: must have NOWAIT"); |
panic("pool_get: must have NOWAIT"); |
| |
|
| |
#ifdef LOCKDEBUG |
| |
if (flags & PR_WAITOK) |
| |
simple_lock_only_held(NULL, "pool_get(PR_WAITOK)"); |
| #endif |
#endif |
| |
#endif /* DIAGNOSTIC */ |
| |
|
| simple_lock(&pp->pr_slock); |
simple_lock(&pp->pr_slock); |
| pr_enter(pp, file, line); |
pr_enter(pp, file, line); |
| Line 953 _pool_put(struct pool *pp, void *v, cons |
|
| Line 958 _pool_put(struct pool *pp, void *v, cons |
|
| simple_unlock(&pp->pr_slock); |
simple_unlock(&pp->pr_slock); |
| } |
} |
| #undef pool_put |
#undef pool_put |
| #endif |
#endif /* DIAGNOSTIC */ |
| |
|
| void |
void |
| pool_put(struct pool *pp, void *v) |
pool_put(struct pool *pp, void *v) |
| Line 1634 pool_cache_get(struct pool_cache *pc, in |
|
| Line 1639 pool_cache_get(struct pool_cache *pc, in |
|
| struct pool_cache_group *pcg; |
struct pool_cache_group *pcg; |
| void *object; |
void *object; |
| |
|
| |
#ifdef LOCKDEBUG |
| |
if (flags & PR_WAITOK) |
| |
simple_lock_only_held(NULL, "pool_cache_get(PR_WAITOK)"); |
| |
#endif |
| |
|
| simple_lock(&pc->pc_slock); |
simple_lock(&pc->pc_slock); |
| |
|
| if ((pcg = pc->pc_allocfrom) == NULL) { |
if ((pcg = pc->pc_allocfrom) == NULL) { |