On 2/12/06, Sascha Volkenandt (ML) lists@magoa.net 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) { .... } }