new way to build

This commit is contained in:
Marty Kraimer
2000-01-24 20:44:57 +00:00
parent d3fd188e55
commit 3377657ca2
4 changed files with 58 additions and 20 deletions
+50
View File
@@ -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;
}
}
+3
View File
@@ -0,0 +1,3 @@
The source files here are vxWorks dependent.
+4 -19
View File
@@ -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
}
+1 -1
View File
@@ -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) */
/*