ttydev_cdevsw has no d_purge

Ed Schouten ed at 80386.nl
Wed Aug 8 17:24:19 UTC 2012


2012/8/8 Hans Petter Selasky <hselasky at c2i.net>:
>> I have a question regarding the changed fragment of code. Why don't you use
>> unr(9) KPI to manage unit numbers ?
>
> Probably I could, but right now the unr interface doesn't support pending unit
> free which I need for other reasons, see below.

What does `pending unit free' mean? I also would prefer it if you used
unr(9) -- not just here, but across the entire USB stack.

> Ed: I would really like to see a custom argument for the tsw_free(), because
> it only needs to know the unit number, and the xsc for UCOM is freed when this
> is called and cannot be referred. Is it possible to have a separate "void *"
> for the tsw_free() function? Is this something which you can implement?

We could extend the TTY code to allow the softc to be changed, e.g.
tty_set_softc(). This function could be called right before calling
tty_rel_gone(). Still, I would prefer it if these kind of things would
not be part of the API. Is there really no way the deallocation of the
softc can be delayed until tsw_free() is called?

Thanks,
-- 
Ed Schouten <ed at 80386.nl>


More information about the freebsd-current mailing list