Thread start functions and external C linkage (VDR starts it's threads "incorrectly")

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

 



On 2/12/06, Sascha Volkenandt (ML) <lists@xxxxxxxxx> wrote:
>
> Klaus Schmidinger wrote:
> > This would allow anybody to do
> >
> >   cThread t;
> >   StartThread(&t);
> >
> > which I don't think would be a good thing to do.
> >
> > Any ideas how to prevent this from happening?
>
> It's perfectly okay to declare StartThread
>
> extern "C" static void *StartThread(cThread *Thread);
>
>
Shouldn't a nameless namepsace be used here? gcc 3.4.3 does not like extern
"C" static
at all (error: multiple storage classes in declaration of ...). i.e., in
thread.c:

namespace {
    extern "C" void *StartThread(cThread *Thread)
    {
    ....
    }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.linuxtv.org/pipermail/vdr/attachments/20060216/6388e02c/attachment.htm

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux