Re: ttydev_cdevsw has no d_purge

看板FB_current作者時間13年前 (2012/08/10 02:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串25/28 (看更多)
On Aug 8, 2012, at 11:41 AM, Hans Petter Selasky wrote: > 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? >>=20 >> 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 >=20 > Are you sure that the new softc won't be used in any callbacks when=20 > tty_rel_gone() is called, except for tsw_free() ? >=20 >> not be part of the API. Is there really no way the deallocation of = the >> softc can be delayed until tsw_free() is called? >=20 > Yes, but that is inconvenient. We use the automatically allocated = softc given=20 > to the driver by newbus. When detach() returns, the softc is freed. = Then we=20 > need to block in detach, and that is causing the problem! I thought the detach protocol was such that you shouldn't return from = detach until all dangling references were gone. you could use tsw_free = to wake up the detach sleeper, no? Warner _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1G908Z56 (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1G908Z56 (FB_current)