From: James S. <jsi...@tr...> - 2001-06-21 05:13:00
|
> Which is, I have just understood that, the wanted behavior. I mistook > release and flush. I added a new input_dev::flush() and > input_flush_device() functions to do what I need. Flush? This is new. How does a userland take advantage and does this function do what I think it does, flush all data stored for a file? > Still, evdev_open can be called several times by a process. evdev_release > is called only once, when the last close on the device file is done > (according to "Linux 2.4 Internals"). Some list elements could then be > left unfreed, thus causing a memory leak. Or did I miss something ??? Only if it does free all the list elements for this particular device when close is called. > I also added a input_dev::accept() and input_accept_device() functions > (hmm, any idea about a better name ? the name misleads the reader into > thinking it's the device that gets accepted) Yeah it is misleading. > The goal of this function is to decide whether an open() call should be > accepted or not. I use this to prevent several processes from using > force-feedback at the same time. I suggest you add comments about this that can be used for the docs. |