]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tty: convert tty_lock_assert to tty_assert_locked to hide lock type
authorKyle Evans <kevans@FreeBSD.org>
Fri, 17 Apr 2020 18:34:49 +0000 (18:34 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Fri, 17 Apr 2020 18:34:49 +0000 (18:34 +0000)
commit23d5326823c740f2ddcd3268216d0a59b374457c
treef6d0e247891d6403320a9da2f4d2bab4abca18e2
parent490befd40a647bb9108c3f71fccb50137ac9a254
tty: convert tty_lock_assert to tty_assert_locked to hide lock type

A later change, currently being iterated on in D24459, will in-fact change
the lock type to an sx so that TTY drivers can sleep on it if they need to.
Committing this ahead of time to make the review in question a little more
palatable.

tty_lock_assert() is unfortunately still needed for now in two places to
make sure that the tty lock has not been recursed upon, for those scenarios
where it's supplied by the TTY driver and possibly a mutex that is allowed
to recurse.

Suggested by: markj
14 files changed:
sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c
sys/dev/bvm/bvm_console.c
sys/dev/cfe/cfe_console.c
sys/dev/ofw/ofw_console.c
sys/dev/rp/rp.c
sys/dev/xen/console/xen_console.c
sys/kern/tty.c
sys/kern/tty_info.c
sys/kern/tty_ttydisc.c
sys/netgraph/ng_tty.c
sys/sys/tty.h
sys/sys/ttydevsw.h
sys/sys/ttydisc.h
sys/sys/ttyhook.h