summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-08-10 06:45:43 +0000
committerjhb <jhb@FreeBSD.org>2001-08-10 06:45:43 +0000
commit6c7715413445f5c8d7517f23cbe78e5ab7d94a45 (patch)
tree02a8612ceb1f8a092e3dfc2250b5d6b96930d398
parent2ff1c253cdbfd553e53fca698ea48f0fedd1ed13 (diff)
downloadFreeBSD-src-6c7715413445f5c8d7517f23cbe78e5ab7d94a45.zip
FreeBSD-src-6c7715413445f5c8d7517f23cbe78e5ab7d94a45.tar.gz
- Remove asleep(), await(), and M_ASLEEP.
- Callers of asleep() and await() have been converted to calling tsleep(). The only caller outside of M_ASLEEP was the ata driver, which called both asleep() and await() with spl-raised, so there was no need for the asleep() and await() pair. M_ASLEEP was unused. Reviewed by: jasone, peter
-rw-r--r--sys/kern/kern_malloc.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index dcabed0..5f9ca0c 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -122,10 +122,6 @@ struct freelist {
*
* If M_NOWAIT is set, this routine will not block and return NULL if
* the allocation fails.
- *
- * If M_ASLEEP is set (M_NOWAIT must also be set), this routine
- * will have the side effect of calling asleep() if it returns NULL,
- * allowing the parent to await() at some future time.
*/
void *
malloc(size, type, flags)
@@ -156,11 +152,6 @@ malloc(size, type, flags)
s = splmem();
mtx_lock(&malloc_mtx);
while (ksp->ks_memuse >= ksp->ks_limit) {
- if (flags & M_ASLEEP) {
- if (ksp->ks_limblocks < 65535)
- ksp->ks_limblocks++;
- asleep((caddr_t)ksp, PSWP+2, type->ks_shortdesc, 0);
- }
if (flags & M_NOWAIT) {
splx(s);
mtx_unlock(&malloc_mtx);
OpenPOWER on IntegriCloud