Re: [PATCH] add device node locking possibility to dvbcore

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

 



Hi Oliver,

Oliver Endriss wrote:
> ts_bus_ctrl does a kind of reference counting.
> 
> For readers:
> - fe->ops.ts_bus_ctrl(fe,1) is called during open
> - fe->ops.ts_bus_ctrl(fe,0) is called during close
> 
> For the one and only writer:
> - fe->ops.ts_bus_ctrl(fe,1) is called during open
> - fe->ops.ts_bus_ctrl(fe,0) is called when the thread exits,
>   usually after close

To properly lock the bridge, fe->ops.ts_bus_ctrl(fe, 1) must be called
only when the first user opens the device and fe->ops.ts_bus_ctrl(fe, 0)
must be called only when the last user closes the device.

I think that the option dvb_shutdown_timeout must be removed to fix the
problem, where the frontend thread can be idle after close(). IMHO the
thread should always be terminated when the last writer closes the
device. The release function should then block until the thread really
has terminated.

Regards,
Andreas

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux