Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: More thoughts on coldboot driver crash



On Tue, Dec 24, 2002 at 12:36:56AM +0100, Holger Waechtler wrote:
> @@ -1040,11 +1059,17 @@ unsigned int 
>  DmxDevDVRPoll(dmxdev_t *dmxdev, struct file *file, poll_table * wait)
>  {
>          if ((file->f_flags&O_ACCMODE)==O_RDONLY) {
> +		if (dmxdev->dvr_buffer.error)
> +			return (POLLIN | POLLRDNORM | POLLPRI | POLLERR);
> +
>  		if (dmxdev->dvr_buffer.pread!=dmxdev->dvr_buffer.pwrite)
>  			return (POLLIN | POLLRDNORM | POLLPRI);
>  		
>  		poll_wait(file, &dmxdev->dvr_buffer.queue, wait);
>  		
> +		if (dmxdev->dvr_buffer.error)
> +			return (POLLIN | POLLRDNORM | POLLPRI | POLLERR);
> +
>  		if (dmxdev->dvr_buffer.pread!=dmxdev->dvr_buffer.pwrite)
>  			return (POLLIN | POLLRDNORM | POLLPRI);
>  		

Just as remark:  AFAIS poll_wait() never ever waits (aka NO scheduler call) but
only add the wait queue to the poll table used by both the
sys_poll and sys_select calls (-> linux/fs/select.c, linux/include/linux/poll.h).
In other words: simply removing the the two checks before poll_wait() will avoid
not needed code.  This holds also true for all other poll functions around within
the DVB driver.

      Werner


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index