From 6c7715413445f5c8d7517f23cbe78e5ab7d94a45 Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 10 Aug 2001 06:45:43 +0000 Subject: - 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 --- sys/kern/kern_malloc.c | 9 --------- 1 file changed, 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); -- cgit v1.1