[linux-dvb] Re: [PATCH] dvb/cinergyT2: Fix cinergyt2_poll() to
allow for non-blocking IO on the frontend device
Dyks, Axel (XL)
xl at xlsigned.net
Sun Jun 4 10:55:20 CEST 2006
Hi,
meanwhile I've received positive feedback in the vlc forum.
So I'm wondering, if there is a chance for the patch to
be applied to the "v4l-dvb" sources ...
Axel
Dyks, Axel (XL) wrote:
> Dyks, Axel (XL) wrote:
>
>>fixed indention and "diff"-ed against "v4l-dvb.git"
>>
>>"cinergyt2_poll()" shouldn't return (POLLIN | POLLRDNORM | POLLPRI) when
>>there are no pending events. User space programs that do non-bocking IO
>>using "select()" and/or "poll()" would otherwise produce high system load.
>>See http://forum.videolan.org/viewtopic.php?t=20529 for details.
>>
>>Signed-off-by: Axel Dyks <xl at xlsigned.net>
>>
>>diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c
>>index 9325d03..9d77ef0 100644
>>--- a/drivers/media/dvb/cinergyT2/cinergyT2.c
>>+++ b/drivers/media/dvb/cinergyT2/cinergyT2.c
>>@@ -544,15 +544,19 @@ static unsigned int cinergyt2_poll (stru
>> {
>> struct dvb_device *dvbdev = file->private_data;
>> struct cinergyt2 *cinergyt2 = dvbdev->priv;
>>+ unsigned int mask = 0;
>>
>> if (cinergyt2->disconnect_pending || mutex_lock_interruptible(&cinergyt2->sem))
>> return -ERESTARTSYS;
>>
>> poll_wait(file, &cinergyt2->poll_wq, wait);
>>
>>+ if (cinergyt2->pending_fe_events != 0)
>>+ mask |= (POLLIN | POLLRDNORM | POLLPRI);
>>+
>> mutex_unlock(&cinergyt2->sem);
>>
>>- return (POLLIN | POLLRDNORM | POLLPRI);
>>+ return mask;
>> }
>>
More information about the linux-dvb
mailing list