Mailing List archive

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

[linux-dvb] Re: More V4 Video API Q's






Hi Holger,

Holger Waechtler <holger@qanu.de> wrote on 06/10/2004 21:17:53:

> Holger Waechtler wrote:
>
> >
> > Have you tried to send a signal to the blocking thread? This can in
> > any case get catched & processed in the ioctl handler.

I was wondering if this would be feasible to do.

>
>
> after a little more thinking I believe that the following would be the
> correct implementation:
>
> * open()
> * start decoder threads
> (... wait for stop command from GUI...)
> * send stop signal to threads
> * call pthread_cancel()
> * pthread_join()
> * close().
>
> Since blocking read/write and ioctl calls are defined by POSIX as
> cancellation points this should work just fine without any extra support
> in the API. After passing non-cancellation points the decoder threads
> should call pthread_testcancel().

Thanks a bunch!  I'll have a look into this tomorrow.

Cheers,

Rob : )





Home | Main Index | Thread Index