From f9a30fac960a8f376680bc553eeb4c9f973e0e52 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Thu, 5 Dec 2002 21:58:24 +0000 Subject: [PATCH] fix sunpro and ms warning --- src/libCom/osi/epicsThread.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/libCom/osi/epicsThread.cpp b/src/libCom/osi/epicsThread.cpp index 3338da06f..a268957f6 100644 --- a/src/libCom/osi/epicsThread.cpp +++ b/src/libCom/osi/epicsThread.cpp @@ -13,6 +13,8 @@ // Author: Jeff Hill // +#include + #include #include #include @@ -25,10 +27,11 @@ epicsThreadRunable::~epicsThreadRunable () {} void epicsThreadRunable::stop() {}; void epicsThreadRunable::show(unsigned int) const {}; -void epicsThreadCallEntryPoint ( void * pPvt ) +extern "C" void epicsThreadCallEntryPoint ( void * pPvt ) { + epicsThread * pThread = + static_cast ( pPvt ); bool waitRelease = false; - epicsThread * pThread = static_cast ( pPvt ); pThread->pWaitReleaseFlag = & waitRelease; try { pThread->beginEvent.wait (); @@ -46,8 +49,14 @@ void epicsThreadCallEntryPoint ( void * pPvt ) } return; } + catch ( std::exception & except ) { + errlogPrintf ( + "epicsThread: Unexpected C++ exception \"%s\" - terminating thread", + except.what () ); + } catch ( ... ) { - throw; + errlogPrintf ( + "epicsThread: Unknown C++ exdception - terminating thread" ); } }