Mailing List archive

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

[linux-dvb] Re: cinergyT2: which kernel/usb module to use?



Holger Waechtler wrote:
> The entire idea of caching pasttime events in a ringbuffer was bogus, do 
> you know any use for this? Your code contains a race condition that can 
> show up at particular combinations of CPU speed and status update rates. 
> Maybe only a theoretical one but in any case an example for bad programming.
...
> a pasttime event, yes. But who cares about the lockbit status some while 
> ago?

Well, now that I've slept over this I must admit that you are right.

But it seems that the concept of event queues is not familiar to you:
- we have on task that generates events when a status change occurs
  (e.g. the kernel thread in dvb_frontend)
- we have another task that consumes events and reacts to them
  (e.g. VDR)

A simple, common programming pattern which IMHO works well
in the case of frontend events, mainly because in practise
there aren't that many events to keep track of.

But you are right when you say that pasttime events are
useless and uninteresting.

Therefor I propose to change *future* APIs (including V4) to
do what you had inplemented in the conergyT2 driver:

- remove the event queue and FE_GET_EVENT completely
- still allow applications to poll() for status changes...
- ...which the app then gets with FE_READ_STATUS


Peace,
Johannes




Home | Main Index | Thread Index