>>>>> "Jan" == Jan Hudec <bulb@ucw.cz> writes: Jan> On Thu, Oct 17, 2002 at 03:39:21PM +0300, Momchil Velikov wrote: Nagaraj> for( buff_index = i = 0; i < xfer_count; i++, buff_index = Nagaraj> (buff_index+1)%MAX_BUFFERS ) { >> Nagaraj> sleep(1000); >> Nagaraj> read( buff_fd, (mbuff +buff_index*BUFF_SIZE), BUFF_SIZE ); >> Nagaraj> } >> >> First, the above code has a race condition, which can add up to 1000 sec (!) >> latency per frame! Jan> Yes, there is. But first, it skips only to the next frame and I wouldn't call 1000 seconds "only". But, yes, not per frame, but per xfer_count frames. ~velco -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/