Add another TTY locking migration macro: tty_getlock().

Some subsystems (HPS-USB) like to lock down the TTY through a more
generic approach, namely the regular mtx(9) macro's. Allow the TTY lock
to be obtained through the new macro.

Discussed with:	hps, thompsa
This commit is contained in:
Ed Schouten 2008-09-24 19:43:09 +00:00
parent f888634792
commit c93400be8c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183332

View File

@ -155,6 +155,7 @@ void tty_rel_gone(struct tty *tp);
#define tty_lock(tp) mtx_lock((tp)->t_mtx)
#define tty_unlock(tp) mtx_unlock((tp)->t_mtx)
#define tty_lock_assert(tp,ma) mtx_assert((tp)->t_mtx, (ma))
#define tty_getlock(tp) ((tp)->t_mtx)
/* Device node creation. */
void tty_makedev(struct tty *tp, struct ucred *cred, const char *fmt, ...)