Date: Mon, 6 Aug 2012 11:28:01 +0200 From: Ed Schouten <ed@80386.nl> To: Hans Petter Selasky <hselasky@c2i.net> Cc: Konstantin Belousov <kostikbel@gmail.com>, freebsd-current@freebsd.org Subject: Re: ttydev_cdevsw has no d_purge Message-ID: <CAJOYFBAq124ZjEyVgTzxd7xEfZmzJqcdf1huujvnLib0OiPBdw@mail.gmail.com> In-Reply-To: <201208051033.13486.hselasky@c2i.net> References: <20120801160323.GN2676@deviant.kiev.zoral.com.ua> <201208012341.25509.hselasky@c2i.net> <CAJOYFBD6Xa08LXuzzYha7Ev9WDJFN5%2BHEqDJ6a2C0puFGZ4-Qg@mail.gmail.com> <201208051033.13486.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Hans, 2012/8/5 Hans Petter Selasky <hselasky@c2i.net>: > When can the previous unit number be re-used? Is there a callback for this? The unit number can be reused after .tsw_free() has been called. > When can the USB serial code assume that it will not be called again and that > all callbacks are drained? The tty_rel_gone() function has to be called while holding the TTY lock. Also, all calls done by the TTY layer into the driver also hold the TTY lock and will assert that the TTY is not in the `gone' state. So you can safely assume that you will not get any driver calls as soon as tty_rel_gone() returns. I hope this helps. If you have any further questions, let me know! -- Ed Schouten <ed@80386.nl>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJOYFBAq124ZjEyVgTzxd7xEfZmzJqcdf1huujvnLib0OiPBdw>