- 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
This commit is contained in:
John Baldwin 2001-08-10 06:56:12 +00:00
parent c4a448100c
commit 02cd7c3cf2
2 changed files with 2 additions and 15 deletions

View File

@ -92,15 +92,6 @@ struct procsig {
#define PS_NOCLDWAIT 0x0001 /* No zombies if child dies */
#define PS_NOCLDSTOP 0x0002 /* No SIGCHLD when children stop. */
/*
* pasleep structure, used by asleep() syscall to hold requested priority
* and timeout values for await().
*/
struct pasleep {
int as_priority; /* Async priority. */
int as_timo; /* Async timeout. */
};
/*
* pargs, used to hold a copy of the command line, if it had a sane length.
*/
@ -274,7 +265,6 @@ struct proc {
struct proc *p_peers; /* (c) */
struct proc *p_leader; /* (c) */
struct pasleep p_asleep; /* (k) Used by asleep()/await(). */
void *p_emuldata; /* (c) Emulator state data. */
struct trapframe *p_frame; /* (k) */
};

View File

@ -349,14 +349,14 @@ kmem_malloc(map, size, flags)
/*
* Note: if M_NOWAIT specified alone, allocate from
* interrupt-safe queues only (just the free list). If
* M_ASLEEP or M_USE_RESERVE is also specified, we can also
* M_USE_RESERVE is also specified, we can also
* allocate from the cache. Neither of the latter two
* flags may be specified from an interrupt since interrupts
* are not allowed to mess with the cache queue.
*/
retry:
m = vm_page_alloc(kmem_object, OFF_TO_IDX(offset + i),
((flags & (M_NOWAIT|M_ASLEEP|M_USE_RESERVE)) == M_NOWAIT) ?
((flags & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) ?
VM_ALLOC_INTERRUPT :
VM_ALLOC_SYSTEM);
@ -374,9 +374,6 @@ retry:
}
vm_map_delete(map, addr, addr + size);
vm_map_unlock(map);
if (flags & M_ASLEEP) {
VM_AWAIT;
}
goto bad;
}
vm_page_flag_clear(m, PG_ZERO);