Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Aug 2012 19:41:17 +0200
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        Ed Schouten <ed@80386.nl>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, freebsd-current@freebsd.org
Subject:   Re: ttydev_cdevsw has no d_purge
Message-ID:  <201208081941.17860.hselasky@c2i.net>
In-Reply-To: <CAJOYFBD4DxL8ZAeKDYZwtv2FaqcV0Taw%2BLES5nc6Ry_t%2BuzfOw@mail.gmail.com>
References:  <20120801160323.GN2676@deviant.kiev.zoral.com.ua> <201208081827.53824.hselasky@c2i.net> <CAJOYFBD4DxL8ZAeKDYZwtv2FaqcV0Taw%2BLES5nc6Ry_t%2BuzfOw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 08 August 2012 19:24:18 Ed Schouten wrote:
> > 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

Are you sure that the new softc won't be used in any callbacks when 
tty_rel_gone() is called, except for tsw_free() ?

> not be part of the API. Is there really no way the deallocation of the
> softc can be delayed until tsw_free() is called?

Yes, but that is inconvenient. We use the automatically allocated softc given 
to the driver by newbus. When detach() returns, the softc is freed. Then we 
need to block in detach, and that is causing the problem!

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208081941.17860.hselasky>