changes for osiThread=>epicsThread
This commit is contained in:
@@ -39,13 +39,17 @@
|
||||
#include "locationException.h"
|
||||
#include "errlog.h"
|
||||
|
||||
class osiTimerThread : public osiThread {
|
||||
class osiTimerThread : public epicsThreadRunable {
|
||||
public:
|
||||
osiTimerThread (osiTimerQueue &, unsigned priority);
|
||||
virtual ~osiTimerThread();
|
||||
private:
|
||||
friend class osiTimer;
|
||||
friend class osiTimerQueue;
|
||||
epicsThread thread;
|
||||
osiTimerQueue &queue;
|
||||
|
||||
virtual void entryPoint ();
|
||||
virtual void run();
|
||||
};
|
||||
|
||||
//
|
||||
@@ -460,7 +464,7 @@ void osiTimerQueue::terminateManagerThread ()
|
||||
|
||||
this->rescheduleEvent.signal ();
|
||||
|
||||
while ( ! this->exitFlag && ! this->pMgrThread->isSuspended () ) {
|
||||
while ( ! this->exitFlag && ! this->pMgrThread->thread.isSuspended () ) {
|
||||
this->exitEvent.wait ( 1.0 );
|
||||
}
|
||||
|
||||
@@ -480,16 +484,19 @@ void osiTimerQueue::terminateManagerThread ()
|
||||
// osiTimerThread::osiTimerThread ()
|
||||
//
|
||||
osiTimerThread::osiTimerThread (osiTimerQueue &queueIn, unsigned priority) :
|
||||
osiThread ("osiTimerQueue", threadGetStackSize (threadStackMedium), priority),
|
||||
thread( *this, "osiTimerQueue",
|
||||
epicsThreadGetStackSize (epicsThreadStackMedium), priority) ,
|
||||
queue (queueIn)
|
||||
{
|
||||
this->start ();
|
||||
this->thread.start ();
|
||||
}
|
||||
|
||||
osiTimerThread::~osiTimerThread() {};
|
||||
|
||||
//
|
||||
// osiTimerThread::entryPoint ()
|
||||
// osiTimerThread::run ()
|
||||
//
|
||||
void osiTimerThread::entryPoint ()
|
||||
void osiTimerThread::run ()
|
||||
{
|
||||
queue.exitFlag = false;
|
||||
while ( ! queue.terminateFlag ) {
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#define osiTimerHInclude
|
||||
|
||||
#include "shareLib.h" /* reset share lib defines */
|
||||
#include "osiThread.h"
|
||||
#include "epicsThread.h"
|
||||
#include "tsStamp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
mtsCreateManagerThread // manager thread expires timers asnychronously
|
||||
};
|
||||
epicsShareFunc osiTimerQueue ( managerThreadSelect mts,
|
||||
unsigned managerThreadPriority = threadPriorityMin );
|
||||
unsigned managerThreadPriority = epicsThreadPriorityMin );
|
||||
epicsShareFunc virtual ~osiTimerQueue();
|
||||
epicsShareFunc double delayToFirstExpire () const; /* returns seconds */
|
||||
epicsShareFunc void process ();
|
||||
@@ -235,7 +235,7 @@ typedef struct osiTimerJumpTable {
|
||||
}osiTimerJumpTable;
|
||||
|
||||
typedef void * osiTimerQueueId;
|
||||
/* see osiThread.h for the range of priorities allowed here */
|
||||
/* see epicsThread.h for the range of priorities allowed here */
|
||||
epicsShareFunc osiTimerQueueId epicsShareAPI osiTimerQueueCreate (unsigned managerThreadPriority);
|
||||
|
||||
typedef void * osiTimerId;
|
||||
|
||||
Reference in New Issue
Block a user