Hi! 1. user does select() to wait for a frame to be ready. 2. select polls until it finds a frame that's done and return POLLIN 3. interrupt handler goes and unmark that frame as ready and start capturing a new frame into that same buffer. 4. user does VIDIOC_DQBUF ioctl which fails because that buffer is not ready anymore. There's no way with the current API to avoid above scenario unless the driver already dequeues the buffer in select() and then just confirms it in the DQBUF ioctl. (Or if VIDIOC_DQBUF blocked). How am I supposed to avoid the race without resorting to the methods mentioned above? -- Regards Abraham What passes for woman's intuition is often nothing more than man's transparency. -- George Nathan __________________________________________________________ Abraham vd Merwe - 2d3D, Inc. Device Driver Development, Outsourcing, Embedded Systems Cell: +27 82 565 4451 Snailmail: Tel: +27 21 761 7549 Block C, Antree Park Fax: +27 21 761 7648 Doncaster Road Email: abraham@xxxxxxxxxx Kenilworth, 7700 Http: http://www.2d3d.com South Africa
Attachment:
pgprqrHHPdOxX.pgp
Description: PGP signature