Move a locking function that was spread throughout disk device drivers into
authorcsapuntz <csapuntz@openbsd.org>
Sun, 9 Apr 2000 19:26:35 +0000 (19:26 +0000)
committercsapuntz <csapuntz@openbsd.org>
Sun, 9 Apr 2000 19:26:35 +0000 (19:26 +0000)
commit501b64689d39b8491dc3beb65e0b3af882e305bd
treef65a502b39d210c2936bedbbf1ce3ea11d11fa82
parent07e3414a332b23aba4b16d6b0302cf906684f033
Move a locking function that was spread throughout disk device drivers into
the disk structure.

The locking was mostly used in disk device drivers to prevent multiple
disklabel operations from going on simultaneously against the device.

Added disk_construct(), a constructor for the disk structure, that
initializes the lock structure in disk. It is called by default in
disk_attach() if it hasn't been called yet.

Added disk_lock and disk_unlock
sys/kern/subr_disk.c
sys/sys/disk.h