Also: move mutex init/destroy into attach/detach functions and
handle case where line discipline is closed before the irframe
device. Fixes PR kern/40271.
- Add a lot of missing selinit() and seldestroy() calls.
- Merge selwakeup() and selnotify() calls into a single selnotify().
- Add an additional 'events' argument to selnotify() call. It will
indicate which event (POLL_IN, POLL_OUT, etc) happen. If unknown,
zero may be used.
Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
of the backend irframe device with autoconf. This might fail or not,
depending on whether another frontend was configured. It helps if
irframetty is the only frontend.
This is a workaround for some inconsistencies in the interaction of
pseudo-devices with the autoconf framework. A fix will require changes
to config(8) which needs more consideration and testing.
Should fix a crash reported by Dieter Baron per PM.
make it a regular "bus frontend" in terms of configuration attachment
(this is something new: a device which can be real or pseudo device),
and use only autoconf functions considered exported.
This suffers a bit from the fact that pseudo-devices don't get "aux"
context data passed to the xxx_attach() function. This can be changed
easily; the differences between real and pseudo devices are diminishing...
what it does; use some code from btuart(4) which might be for a
similar purpose.
XXX This is very definitely broken; when I understand how this is
supposed to work and how it can be tested I'll have another look at it.
- for structure fields that are conditionally present,
make those fields always present.
- for functions which are conditionally inline, make them never inline.
- remove some other functions which are conditionally defined but
don't actually do anything anymore.
- make a lock-debugging function conditional on only LOCKDEBUG.
as discussed on tech-kern some time back.
- Replace references to linesw[0] with a ttyldisc_default() function
that returns the default ("termios") line discipline.
- The linesw[] array is gone, replaced by a linked list.
- ttyldisc_add() and ttyldisc_remove() have been replaced by
ttyldisc_attach() and ttyldisc_detach().
- Things that provide line disciplines are now responsible for
registering those disciplines with the system. The linesw
structures are no longer declared in tty_conf.c
- Line disciplines are now refcounted; a lookup causes a reference to
be held. ttyldisc_release() releases the reference. Attempts to
detach an in-use line discipline result in EBUSY.
- Fix function signature lossage in if_sl.c, if_strip.c, and tty_tb.c
that was masked by the old tty_conf.c
- tty_init() is no longer necessary; delete it and its call from main().