diff --git a/src/libCom/osi/os/VMS/osdTime.cpp b/src/libCom/osi/os/VMS/osdTime.cpp new file mode 100644 index 000000000..f2b937f51 --- /dev/null +++ b/src/libCom/osi/os/VMS/osdTime.cpp @@ -0,0 +1,50 @@ + +// +// should move the gettimeofday() proto for VMS +// into a different header +// +#include "osiSock.h" + +#define epicsExportSharedSymbols +#include "osiTime.h" + +// +// osiTime::osdGetCurrent () +// +extern "C" epicsShareFunc int tsStampGetCurrent (TS_STAMP *pDest) +{ +# if defined(CLOCK_REALTIME) + struct timespec ts; + int status; + + status = clock_gettime (CLOCK_REALTIME, &ts); + if (status) { + return -1; + } + *pDest = osiTime (ts); + return 0; +# else + int status; + struct timeval tv; + + status = gettimeofday (&tv, NULL); + if (status!=0) { + return -1; + } + *pDest = osiTime (tv); + return 0; +# endif +} + +// +// tsStampGetEvent () +// +extern "C" epicsShareFunc int epicsShareAPI tsStampGetEvent (TS_STAMP *pDest, unsigned eventNumber) +{ + if (eventNumber==tsStampEventCurrentTime) { + return tsStampGetCurrent (pDest); + } + else { + return tsStampERROR; + } +} \ No newline at end of file diff --git a/src/libCom/osi/os/vxWorks/README b/src/libCom/osi/os/vxWorks/README new file mode 100644 index 000000000..bbc0046b3 --- /dev/null +++ b/src/libCom/osi/os/vxWorks/README @@ -0,0 +1,3 @@ + +The source files here are vxWorks dependent. + diff --git a/src/libCom/osi/osiThread.h b/src/libCom/osi/osiThread.h index e7e6fad05..2e1be5da1 100644 --- a/src/libCom/osi/osiThread.h +++ b/src/libCom/osi/osiThread.h @@ -24,15 +24,6 @@ typedef void (*THREADFUNC)(void *parm); #define threadPriorityScanLow 60 #define threadPriorityScanHigh 70 -/* - *The following functions convert to/from osi (operating system independent) - * and oss (operating system specific) priority values - * NOTE THAT ALL OTHER CALLS USE osi priority values -*/ - -epicsShareFunc int epicsShareAPI threadGetOsiPriorityValue(int ossPriority); -epicsShareFunc int epicsShareAPI threadGetOssPriorityValue(int osiPriority); - /* stack sizes for each stackSizeClass are implementation and CPU dependent */ typedef enum { threadStackSmall, threadStackMedium, threadStackBig @@ -44,22 +35,16 @@ typedef void *threadId; epicsShareFunc threadId epicsShareAPI threadCreate(const char *name, unsigned int priority, unsigned int stackSize, THREADFUNC funptr,void *parm); -epicsShareFunc void epicsShareAPI threadDestroy(threadId id); -epicsShareFunc void epicsShareAPI threadSuspend(threadId id); +epicsShareFunc void epicsShareAPI threadSuspend(); epicsShareFunc void epicsShareAPI threadResume(threadId id); -epicsShareFunc int epicsShareAPI threadGetPriority(threadId id); -epicsShareFunc void epicsShareAPI threadSetPriority(threadId id,int priority); -epicsShareFunc void epicsShareAPI threadSetDestroySafe(void); -epicsShareFunc void epicsShareAPI threadSetDestroyUnsafe(void); -epicsShareFunc const char * epicsShareAPI threadGetName(threadId id); +epicsShareFunc unsigned int epicsShareAPI threadGetPriority(threadId id); +epicsShareFunc void epicsShareAPI threadSetPriority( + threadId id,unsigned int priority); epicsShareFunc int epicsShareAPI threadIsEqual(threadId id1, threadId id2); epicsShareFunc int epicsShareAPI threadIsReady(threadId id); epicsShareFunc int epicsShareAPI threadIsSuspended(threadId id); epicsShareFunc void epicsShareAPI threadSleep(double seconds); epicsShareFunc threadId epicsShareAPI threadGetIdSelf(void); -epicsShareFunc void epicsShareAPI threadLockContextSwitch(void); -epicsShareFunc void epicsShareAPI threadUnlockContextSwitch(void); -epicsShareFunc threadId epicsShareAPI threadNameToId(const char *name); #ifdef __cplusplus } diff --git a/src/libCom/osi/tsStamp.h b/src/libCom/osi/tsStamp.h index 2c74cb90b..7a06e2390 100644 --- a/src/libCom/osi/tsStamp.h +++ b/src/libCom/osi/tsStamp.h @@ -76,7 +76,7 @@ epicsShareFunc int epicsShareAPI tsStampEqual (const TS_STAMP *pLeft, const TS_S epicsShareFunc int epicsShareAPI tsStampNotEqual (const TS_STAMP *pLeft, const TS_STAMP *pRight); /* returns boolean result */ epicsShareFunc int epicsShareAPI tsStampLessThan (const TS_STAMP *pLeft, const TS_STAMP *pRight); /* returns boolean result (true if *pLeft < *pRight) */ epicsShareFunc int epicsShareAPI tsStampLessThanEqual (const TS_STAMP *pLeft, const TS_STAMP *pRight); /* returns boolean result (true if *pLeft <= *pRight) */ -epicsShareFunc int vtsStampGreaterThan (const TS_STAMP *pLeft, const TS_STAMP *pRight); /* returns boolean result (true if *pLeft > *pRight) */ +epicsShareFunc int epicsShareAPI tsStampGreaterThan (const TS_STAMP *pLeft, const TS_STAMP *pRight); /* returns boolean result (true if *pLeft > *pRight) */ epicsShareFunc int epicsShareAPI tsStampGreaterThanEqual (const TS_STAMP *pLeft, const TS_STAMP *pRight); /* returns boolean result (true if *pLeft >= *pRight) */ /*