Re: close call in a device ?

2000-11-09 Thread bruno schwander
Thank you infinitely for all this information. It will take me a while to absorb and poke around in the right places but this is definitely extremely useful, thank you. I will most probably come back to you with more questions, in a near future time... bruno Terry Lambert wrote: > > > To add t

Re: close call in a device ?

2000-11-09 Thread Terry Lambert
> > To add to this, the close calls can be forces; there is a flag > > in the device structure wich can force notification. I'm not > > sure what it does over a fork(), though: I think you really want > > open notification. > > You mean that when I register my device/kernel module, I can > expli

Re: close call in a device ?

2000-11-08 Thread bruno schwander
Julian Elischer wrote: > the problem here can be solved by using Poul's 'cloning device' > interface in the driver. > I don't think he has it quite completed but it is partly there.. maybe > enough.. > this seems very promising. Any pointers toward more info on this ? Thanks bruno > > only i

Re: close call in a device ?

2000-11-08 Thread bruno schwander
Terry Lambert wrote: > > > when a process closes the device, I do not get a "close" call for each > > > process closing the device. I instead get a close only on the last > > > process closing the device. > > > > devices in a similar way as the one is used for scanning pty's). > > To add to this,

Re: close call in a device ?

2000-11-08 Thread Julian Elischer
Terry Lambert wrote: > > > If I understand you correctly, you have multiple processes all of which > > are going to try to open /dev/foo, and you want them to behave as though > > they have each opened a unique device? > > > > You can't do this with FreeBSD, or with many other Unixes. > > Any SV

Re: close call in a device ?

2000-11-08 Thread Terry Lambert
> If I understand you correctly, you have multiple processes all of which > are going to try to open /dev/foo, and you want them to behave as though > they have each opened a unique device? > > You can't do this with FreeBSD, or with many other Unixes. Any SVR4 system can support this. So can

Re: close call in a device ?

2000-11-08 Thread Terry Lambert
> > when a process closes the device, I do not get a "close" call for each > > process closing the device. I instead get a close only on the last > > process closing the device. > > the reason for this is that you might have a process fork() after > it has opened the device, and you do not want t

Re: close call in a device ?

2000-11-08 Thread bruno schwander
Hello, Luigi Rizzo wrote: > you could do something like this: > + open allocates a descriptor which stores the PID of the process requesting > access to the "device" > doing that now > + each I/O operation uses the descriptor matching the PID passed to the > read/write/ioctl that too > >

Re: close call in a device ?

2000-11-07 Thread Luigi Rizzo
> Hi, > > The reason I am doing this, is precisely because I need to virtualize accesses > from several processes to _one_ _predefined_ device. I have no control over that > device name from the client process point of view, so I can not have multiple > devices. I pretty much need to be able to

Re: close call in a device ?

2000-11-07 Thread Mike Smith
> The reason I am doing this, is precisely because I need to virtualize > accesses from several processes to _one_ _predefined_ device. I have no > control over that device name from the client process point of view, so I > can not have multiple devices. I pretty much need to be able to lie to

Re: close call in a device ?

2000-11-07 Thread bruno schwander
Hi, The reason I am doing this, is precisely because I need to virtualize accesses from several processes to _one_ _predefined_ device. I have no control over that device name from the client process point of view, so I can not have multiple devices. I pretty much need to be able to lie to the

Re: close call in a device ?

2000-11-07 Thread Luigi Rizzo
> when a process closes the device, I do not get a "close" call for each > process closing the device. I instead get a close only on the last > process closing the device. the reason for this is that you might have a process fork() after it has opened the device, and you do not want to get to the

close call in a device ?

2000-11-07 Thread bruno schwander
Hello everybody, I am writing a pseudo-device driver (as a kernel module) that needs to be opened in write mode by several processes. The problem I am having is that I do get all the "open" calls when a process opens the device, and I am able to process data written, etc. on a per-process basis;