Re: RFC: poll behavior

2011-07-01 Thread Hans Verkuil
On Thursday, June 30, 2011 22:35:15 Mauro Carvalho Chehab wrote: Em 30-06-2011 10:46, Hans Verkuil escreveu: On Wednesday, June 29, 2011 16:35:04 Hans de Goede wrote: Hi, On 06/29/2011 03:43 PM, Hans Verkuil wrote: On Wednesday, June 29, 2011 15:07:14 Hans de Goede wrote: snip

Re: RFC: poll behavior

2011-07-01 Thread Mauro Carvalho Chehab
Em 01-07-2011 06:45, Hans Verkuil escreveu: On Thursday, June 30, 2011 22:35:15 Mauro Carvalho Chehab wrote: This also leads to another ambiguity with poll(): what should poll do if another filehandle started streaming? So fh1 called STREAMON (and so becomes the 'owner' of the stream),

Re: RFC: poll behavior

2011-07-01 Thread Mauro Carvalho Chehab
Em 01-07-2011 08:59, Mauro Carvalho Chehab escreveu: Em 01-07-2011 06:45, Hans Verkuil escreveu: On Thursday, June 30, 2011 22:35:15 Mauro Carvalho Chehab wrote: This also leads to another ambiguity with poll(): what should poll do if another filehandle started streaming? So fh1 called

Re: RFC: poll behavior

2011-07-01 Thread Hans Verkuil
On Friday, July 01, 2011 13:59:14 Mauro Carvalho Chehab wrote: Em 01-07-2011 06:45, Hans Verkuil escreveu: On Thursday, June 30, 2011 22:35:15 Mauro Carvalho Chehab wrote: This also leads to another ambiguity with poll(): what should poll do if another filehandle started streaming? So

Re: RFC: poll behavior

2011-06-30 Thread Hans Verkuil
On Wednesday, June 29, 2011 16:35:04 Hans de Goede wrote: Hi, On 06/29/2011 03:43 PM, Hans Verkuil wrote: On Wednesday, June 29, 2011 15:07:14 Hans de Goede wrote: snip if (q-num_buffers == 0 q-fileio == NULL) { - if (!V4L2_TYPE_IS_OUTPUT(q-type) (q-io_modes

Re: RFC: poll behavior

2011-06-30 Thread Mauro Carvalho Chehab
Em 30-06-2011 10:46, Hans Verkuil escreveu: On Wednesday, June 29, 2011 16:35:04 Hans de Goede wrote: Hi, On 06/29/2011 03:43 PM, Hans Verkuil wrote: On Wednesday, June 29, 2011 15:07:14 Hans de Goede wrote: snip if (q-num_buffers == 0 q-fileio == NULL) { - if

RFC: poll behavior

2011-06-29 Thread Hans Verkuil
Hi all, This RFC is based on recent discussions with regards to how the poll function in a V4L2 driver should behave. Some relevant documents: POSIX: http://pubs.opengroup.org/onlinepubs/009695399/functions/select.html http://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html

Re: RFC: poll behavior

2011-06-29 Thread Hans de Goede
Hi, On 06/29/2011 01:26 PM, Hans Verkuil wrote: Hi all, This RFC is based on recent discussions with regards to how the poll function in a V4L2 driver should behave. Some relevant documents: POSIX: http://pubs.opengroup.org/onlinepubs/009695399/functions/select.html

Re: RFC: poll behavior

2011-06-29 Thread Hans Verkuil
On Wednesday, June 29, 2011 14:10:44 Hans de Goede wrote: Hi, On 06/29/2011 01:26 PM, Hans Verkuil wrote: Hi all, This RFC is based on recent discussions with regards to how the poll function in a V4L2 driver should behave. Some relevant documents: POSIX:

Re: RFC: poll behavior

2011-06-29 Thread Hans Verkuil
On Wednesday, June 29, 2011 15:07:14 Hans de Goede wrote: Hi, On 06/29/2011 02:42 PM, Hans Verkuil wrote: On Wednesday, June 29, 2011 14:10:44 Hans de Goede wrote: Hi, On 06/29/2011 01:26 PM, Hans Verkuil wrote: Snip 4) Proposal to change the poll behavior For the short term

Re: RFC: poll behavior

2011-06-29 Thread Hans de Goede
Hi, On 06/29/2011 03:43 PM, Hans Verkuil wrote: On Wednesday, June 29, 2011 15:07:14 Hans de Goede wrote: snip Ok, yet more reason to go with my proposal, but then simplified to: When streaming has not started return POLLIN or POLLOUT (or-ed with POLLPRI if events are pending). So would