vio: Reduce code duplication in control queue handling
authorsf <sf@openbsd.org>
Tue, 17 Sep 2024 09:00:14 +0000 (09:00 +0000)
committersf <sf@openbsd.org>
Tue, 17 Sep 2024 09:00:14 +0000 (09:00 +0000)
commit101c378c93d8de51fb632c39fe03dceb6ffe7aed
tree65b986569313a2cbbc32240e09d4304ab5734fcb
parentf827f77fea138a5e050b847346fb2361ee0d1f85
vio: Reduce code duplication in control queue handling

Pull the common parts of all the control queue operations into separate
functions.

While there, avoid setting sc_ctrl_inuse FREE if it was RESET, except in
vio_stop. Doing so could lead to more race conditions.

ok bluhm@
sys/dev/pv/if_vio.c