version 1.164, 2008/07/04 16:41:00 |
version 1.165, 2008/07/07 12:27:19 |
Line 2471 pool_cache_get_paddr(pool_cache_t pc, in |
|
Line 2471 pool_cache_get_paddr(pool_cache_t pc, in |
|
|
|
/* Lock out interrupts and disable preemption. */ |
/* Lock out interrupts and disable preemption. */ |
s = splvm(); |
s = splvm(); |
do { |
while (/* CONSTCOND */ true) { |
/* Try and allocate an object from the current group. */ |
/* Try and allocate an object from the current group. */ |
cc = pc->pc_cpus[curcpu()->ci_index]; |
cc = pc->pc_cpus[curcpu()->ci_index]; |
KASSERT(cc->cc_cache == pc); |
KASSERT(cc->cc_cache == pc); |
Line 2508 pool_cache_get_paddr(pool_cache_t pc, in |
|
Line 2508 pool_cache_get_paddr(pool_cache_t pc, in |
|
* no more objects are available, it will return false. |
* no more objects are available, it will return false. |
* Otherwise, we need to retry. |
* Otherwise, we need to retry. |
*/ |
*/ |
} while (pool_cache_get_slow(cc, s, &object, pap, flags)); |
if (!pool_cache_get_slow(cc, s, &object, pap, flags)) |
|
break; |
|
} |
|
|
return object; |
return object; |
} |
} |
Line 2607 pool_cache_put_paddr(pool_cache_t pc, vo |
|
Line 2609 pool_cache_put_paddr(pool_cache_t pc, vo |
|
|
|
/* Lock out interrupts and disable preemption. */ |
/* Lock out interrupts and disable preemption. */ |
s = splvm(); |
s = splvm(); |
do { |
while (/* CONSTCOND */ true) { |
/* If the current group isn't full, release it there. */ |
/* If the current group isn't full, release it there. */ |
cc = pc->pc_cpus[curcpu()->ci_index]; |
cc = pc->pc_cpus[curcpu()->ci_index]; |
KASSERT(cc->cc_cache == pc); |
KASSERT(cc->cc_cache == pc); |
Line 2637 pool_cache_put_paddr(pool_cache_t pc, vo |
|
Line 2639 pool_cache_put_paddr(pool_cache_t pc, vo |
|
* If put_slow() releases the object for us, it |
* If put_slow() releases the object for us, it |
* will return false. Otherwise we need to retry. |
* will return false. Otherwise we need to retry. |
*/ |
*/ |
} while (pool_cache_put_slow(cc, s, object)); |
if (!pool_cache_put_slow(cc, s, object)) |
|
break; |
|
} |
} |
} |
|
|
/* |
/* |