Mailing List archive

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

[vdr] Re: Version of 1.3 that works ?



linux@youmustbejoking.demon.co.uk(Darren Salt)  15.12.04 20:12

>I demand that Luca Olivetti may or may not have written...

>> Rainer Zocholl wrote:
>>> try 1.3.17 with the thread save patches(you MUST apply them!)

>> It's not necessary if your glibc is compiled with thread local
>> storage enabled (as is the case with mandrake 10.0).

>Marking certain variables __thread may be a Good Idea. 

That will not compile under 2.95...
(I thought i have posted?)

Too it makes, for example, no sense to have the "base time" 
thread specific, as there is only one "base time" in vdr.

Of cause there are places where a __thread would make sense
to store thread spezific data.
But it's not gnerally a good idea, IMHO.


>Even so, not everybody's using TLS, 

or can use it at all.
I don't know how i can get a /lib/tls in may debian 3.0. kernel 2.4.27
Somewhere i read that tls is a backport only in redhat&Co.


>so the thread-safe patches are still useful...

"thread local data" does *not* mean that this functions 
become "reentrance safe"!
That can't be done so easy as the compiler does not know
if teh programmer did the recursive call intentionally or not.
As the "recursion" may occure unwilingly in some sub sub sub
routines the reentrant functions should always be used in
non-trival programs as vdr is, regardless how sure the developer
is, that never ever such an unwanted recursion/recall may occur, IMHO.


It is true that  "reentrant" functions are usually thread safe.
But this can't be inverted!



Rainer---<=====>                         Vertraulich
             //
           //                              
         <=====>--------------ocholl, Kiel, Germany ------------





Home | Main Index | Thread Index