Subject: multiple cdev open/close
To: None <>
From: Jiri Slaby <>
List: tech-kern
Date: 09/04/2006 11:20:45

I have netbsd cdev driver. I do multiple opens (more instances) on it, is there 
any way to get know about each close of these instances?

'A' process does:
ioctl(START_IT) + others
for (;;) {
read it by mmap

^C, so kernel calls close for it and releases A process' resources.

If there is also process B, which does the very same thing, for first process 
killed there is no close call and kernel turns into ddb. I do need to know about 
all closes -- is there such a way?

Maybe this breaks some netbsd development rules. Ok, then what's the matter of 
implementing multiple access of processes into kernel space -- userspace mmap 
area with data filled by the driver. Each process (instance) has its own queue, 
which is filled by the driver according to hardware data.

--            Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8  22A0 32CC 55C3 39D4 7A7E