From owner-freebsd-current@FreeBSD.ORG Wed Aug 8 17:40:57 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 10FC1106566C for ; Wed, 8 Aug 2012 17:40:57 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.c2i.net [212.247.154.2]) by mx1.freebsd.org (Postfix) with ESMTP id 90B408FC14 for ; Wed, 8 Aug 2012 17:40:56 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe01.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 308384168; Wed, 08 Aug 2012 19:40:47 +0200 From: Hans Petter Selasky To: Ed Schouten Date: Wed, 8 Aug 2012 19:41:17 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.1-PRERELEASE; KDE/4.8.4; amd64; ; ) References: <20120801160323.GN2676@deviant.kiev.zoral.com.ua> <201208081827.53824.hselasky@c2i.net> In-Reply-To: X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201208081941.17860.hselasky@c2i.net> Cc: Konstantin Belousov , freebsd-current@freebsd.org Subject: Re: ttydev_cdevsw has no d_purge X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2012 17:40:57 -0000 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