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?



Johannes Stezenbach wrote:

Holger Waechtler wrote:

the FE_GET_EVENT ioctl was simply not implemented (I already rendered it obsolete in my mind, since GET_STATUS and GET_FRONTEND provide the same functionality...).
please try again,

Nah, I won't try because to me the currect code looks
suspiciously like an endless recursion.

It would also not work the way you tried to implement it,
as VDR does the following before tuning:

while (GetFrontendEvent(event))
; // discard stale events

Which would run into an endless loop if you create
frontend events "on demand".

The above code is in any case wrong, you assume that the hardware delivers less events than you process, this is surely in most cases right but definitely not safe. The correct implementation is this:

while (!exit) {
select(fd, ...);
ioctl(fd, FE_READ_STATUS, &status);
/* process/display status */
};

Holger





Home | Main Index | Thread Index