Simplify sleep_setup API to two operations in preparation for splitting
authormpi <mpi@openbsd.org>
Mon, 8 Feb 2021 08:18:45 +0000 (08:18 +0000)
committermpi <mpi@openbsd.org>
Mon, 8 Feb 2021 08:18:45 +0000 (08:18 +0000)
commit436960cf02775967604f33beab159c0cf4ade5a0
tree022a7dc14e584a114cfe643944556b30f771ce14
parent2e7ba49766ccb2f3781bf5134b4e2d3ba56e817f
Simplify sleep_setup API to two operations in preparation for splitting
the SCHED_LOCK().

Putting a thread on a sleep queue is reduce to the following:

sleep_setup();
/* check condition or release lock */
sleep_finish();

Previous version ok cheloha@, jmatthew@, ok claudio@
sys/dev/dt/dt_dev.c
sys/dev/pci/drm/drm_linux.c
sys/dev/pci/if_myx.c
sys/kern/kern_rwlock.c
sys/kern/kern_sched.c
sys/kern/kern_sig.c
sys/kern/kern_synch.c
sys/kern/kern_timeout.c
sys/kern/subr_log.c
sys/sys/proc.h
sys/sys/systm.h