Comment 7 for bug 885802

Revision history for this message
Andrew Johnson (anj) wrote :

epicsThreadTest.cpp contains:

extern "C" {
static void thread(void *arg)
{
    ...
}
}

tux% nm epicsThreadTest.o | grep thread
00000000000000e0 t thread

Thus when using this construct the symbol is not visible externally.

Anyway, the point of my adding epicsThreadCreateCpp() was to allow us to *not* have to use the extern "C" that we are supposed to have with epicsThreadCreate(). Any C++ function pointer matching
    void (*)(void*)
can be passed to this, and the function can even safely throw exceptions, which will be logged before the thread exits.

Yes it's a new API that can't be used with external code that has to build against older Base versions etc., but I think it's worth having the Cpp() version as well for the throw safety (which isn't present in the old version and shouldn't be added since older releases don't have it).

If you still object I will drop this.