All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC 0/2] libv4l2: fix deadlock when DQBUF in block mode
@ 2014-06-05 15:31 Thiago Santos
  2014-06-05 15:31 ` [PATCH/RFC 1/2] v4l2grab: Add threaded producer/consumer option Thiago Santos
  2014-06-05 15:31 ` [PATCH/RFC 2/2] libv4l2: release the lock before doing a DQBUF Thiago Santos
  0 siblings, 2 replies; 5+ messages in thread
From: Thiago Santos @ 2014-06-05 15:31 UTC (permalink / raw)
  To: linux-media; +Cc: Hans de Goede, Thiago Santos

This patchset modifies v4l2grab to allow using 2 threads (one for qbuf and
another for dqbuf) to simulate multithreaded v4l2 usage.

This is done to show a issue when using libv4l2 in blocking mode, if a DQBUF
is issued when there are no buffers available it will block waiting for one but,
as it blocks holding the stream_lock, a QBUF will never happen and we have
a deadlock.

Thiago Santos (2):
  v4l2grab: Add threaded producer/consumer option
  libv4l2: release the lock before doing a DQBUF

 contrib/test/Makefile.am |   2 +-
 contrib/test/v4l2grab.c  | 265 +++++++++++++++++++++++++++++++++++++++--------
 lib/libv4l2/libv4l2.c    |   2 +
 3 files changed, 225 insertions(+), 44 deletions(-)

-- 
2.0.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-06  9:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-05 15:31 [PATCH/RFC 0/2] libv4l2: fix deadlock when DQBUF in block mode Thiago Santos
2014-06-05 15:31 ` [PATCH/RFC 1/2] v4l2grab: Add threaded producer/consumer option Thiago Santos
2014-06-05 16:16   ` Mauro Carvalho Chehab
2014-06-05 15:31 ` [PATCH/RFC 2/2] libv4l2: release the lock before doing a DQBUF Thiago Santos
2014-06-06  9:38   ` Hans de Goede

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.