On Thu, Oct 17, 2002 at 04:32:39PM +0530, Nagaraj wrote: > > > That seems the interface is sane. However. Don't do sleep (btw: sleep > > has second granularity - you would want usleep), do poll. It has > > timeout, it wakes up on a signal, but in addition it allows you to wake > > up whenever the network is ready to accept more data. > > > > No the thing is the device itself may not be ready to accept the data, > ( either network card or any other video device ), so the usleep() > with smaller delays could return before data is xfered. > For that u need other sync schemes ( probably a bit in the mmaped > area which indicates whether data is completely xfered. and set in interrupt > handler ) Ouch! You only want to wake up on a signal... that what pause is for! I said _network_ is ready to accept more data. Because when you write a frame to the net, it may accept just a part of it. So you have to wake up when the network is ready for the next bit. Poll returns when either a signal arrives, or input/output is possible on monitored descriptors. ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bulb@ucw.cz> -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/