Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Apr 2011 02:17:09 +0200
From:      Bartosz Fabianowski <freebsd@chillt.de>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        freebsd-hackers@freebsd.org, Hans Petter Selasky <hselasky@c2i.net>
Subject:   Re: Is there some implicit locking of device methods?
Message-ID:  <4DB76085.4000402@chillt.de>
In-Reply-To: <20110426124403.GQ48734@deviant.kiev.zoral.com.ua>
References:  <4DB695DB.1080505@chillt.de> <201104261217.23858.hselasky@c2i.net> <4DB6BCC6.5050001@chillt.de> <20110426124403.GQ48734@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
> If you needs per-file private data for cdev, you would be better served
> by cdevpriv(9) KPI. Cloning is too hard to use correctly for such task.

Thanks, I just got that working. To help those going down a similar path 
in the future, I would like to note quickly that the following must be 
added to the cdevsw structure to ensure proper clean-up:

.d_flags = D_TRACKCLOSE

I just spent hours debugging panics until I realized only the last 
close() was triggering a call to my .d_close method.

- Bartosz



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