moved epicsEvent implementation out of header file

This commit is contained in:
Jeff Hill
2002-03-21 22:22:10 +00:00
parent 47dc34084a
commit d1d333e734

View File

@@ -61,69 +61,5 @@ epicsShareFunc void epicsShareAPI epicsEventShow(
#endif /*__cplusplus */
#include "osdEvent.h"
/*The c++ implementation consists of inline calls to the c code */
#ifdef __cplusplus
inline epicsEvent::epicsEvent (epicsEventInitialState initial) :
id ( epicsEventCreate ( initial ) )
{
if ( this->id == 0 ) {
throwWithLocation ( noMemory () );
}
}
inline epicsEvent::~epicsEvent ()
{
epicsEventDestroy ( this->id );
}
inline void epicsEvent::signal ()
{
epicsEventSignal ( this->id );
}
inline void epicsEvent::wait ()
{
epicsEventWaitStatus status;
status = epicsEventWait (this->id);
if (status!=epicsEventWaitOK) {
throwWithLocation ( invalidSemaphore () );
}
}
inline bool epicsEvent::wait (double timeOut)
{
epicsEventWaitStatus status;
status = epicsEventWaitWithTimeout (this->id, timeOut);
if (status==epicsEventWaitOK) {
return true;
} else if (status==epicsEventWaitTimeout) {
return false;
} else {
throwWithLocation ( invalidSemaphore () );
}
return false;
}
inline bool epicsEvent::tryWait ()
{
epicsEventWaitStatus status;
status = epicsEventTryWait (this->id);
if (status==epicsEventWaitOK) {
return true;
} else if (status==epicsEventWaitTimeout) {
return false;
} else {
throwWithLocation ( invalidSemaphore () );
}
return false;
}
inline void epicsEvent::show ( unsigned level ) const
{
epicsEventShow ( this->id, level );
}
#endif /*__cplusplus */
#endif /* epicsEventh */