linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* VB2 will returning -ERESTARTSYS to userland
@ 2015-10-09  4:30 Chetan Nanda
  2015-10-09 15:40 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 2+ messages in thread
From: Chetan Nanda @ 2015-10-09  4:30 UTC (permalink / raw)
  To: LMML

Hi,

I am working on V4L2 base videodecoder,
I have two threads say A and B. Thread A is for configuration and
Thread B for queuing/de-queuing buffers.

In one usecase,
- Thread B is blocked on VIDIOC_DQBUF,
- and at same time Thread A do the flush and do, STREAMOFF, QBUF, STREAMON.

Once thread A do this, Thread B waked up (as a result of STREAMOFF)
and return -ERESTARTSYS (from wait_interrupt_interruptible) from
DQBUF.

ERESTARTSYS is for kernel internal and should not be passed to
userside, and even ERESTARTSYS is not available at user side.

Shouldn't VB2 catch ERESTARTSYS and return -RESTART or some other error?

Thanks,
Chetan Nanda

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

* Re: VB2 will returning -ERESTARTSYS to userland
  2015-10-09  4:30 VB2 will returning -ERESTARTSYS to userland Chetan Nanda
@ 2015-10-09 15:40 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2015-10-09 15:40 UTC (permalink / raw)
  To: Chetan Nanda; +Cc: LMML

Em Fri, 9 Oct 2015 10:00:39 +0530
Chetan Nanda <chetannanda@gmail.com> escreveu:

> Hi,
> 
> I am working on V4L2 base videodecoder,
> I have two threads say A and B. Thread A is for configuration and
> Thread B for queuing/de-queuing buffers.
> 
> In one usecase,
> - Thread B is blocked on VIDIOC_DQBUF,
> - and at same time Thread A do the flush and do, STREAMOFF, QBUF, STREAMON.
> 
> Once thread A do this, Thread B waked up (as a result of STREAMOFF)
> and return -ERESTARTSYS (from wait_interrupt_interruptible) from
> DQBUF.
> 
> ERESTARTSYS is for kernel internal and should not be passed to
> userside, and even ERESTARTSYS is not available at user side.
> 
> Shouldn't VB2 catch ERESTARTSYS and return -RESTART or some other error?

In thesis, the ioctl core should be handling -ERESTARTSYS. Are you
sure that you're seeing ERESTARTSYS on userspace?

> 
> Thanks,
> Chetan Nanda
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-10-09 15:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-09  4:30 VB2 will returning -ERESTARTSYS to userland Chetan Nanda
2015-10-09 15:40 ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).