changes for osiThread=>epicsThread

This commit is contained in:
Marty Kraimer
2001-01-18 19:08:14 +00:00
parent 4c247070aa
commit dbe9c8e75f
85 changed files with 1163 additions and 1126 deletions
+3 -3
View File
@@ -17,7 +17,7 @@ of this distribution.
#define epicsExportSharedSymbols
#include "errlog.h"
#include "cantProceed.h"
#include "osiThread.h"
#include "epicsThread.h"
epicsShareFunc void * epicsShareAPI callocMustSucceed(size_t count, size_t size, const char *errorMessage)
{
@@ -45,6 +45,6 @@ epicsShareFunc void epicsShareAPI cantProceed(const char *errorMessage)
{
if(errorMessage) errlogPrintf("fatal error: %s\n",errorMessage);
else errlogPrintf("fatal error\n");
threadSleep(1.0);
threadSuspendSelf();
epicsThreadSleep(1.0);
epicsThreadSuspendSelf();
}
@@ -15,16 +15,16 @@
*/
#define epicsExportSharedSymbols
#include "osiThread.h"
#include "epicsThread.h"
#include "ipAddrToAsciiAsynchronous.h"
epicsMutex ipAddrToAsciiEngine::mutex;
ipAddrToAsciiEngine::ipAddrToAsciiEngine ( const char *pName ) :
osiThread ( pName, 0x1000, threadPriorityLow ), nextId ( 0u ),
exitFlag ( false )
thread(*(new epicsThread(*this,pName,0x1000,epicsThreadPriorityLow))),
nextId ( 0u ), exitFlag ( false )
{
this->start (); // start the thread
this->thread.start (); // start the thread
}
ipAddrToAsciiEngine::~ipAddrToAsciiEngine ()
@@ -44,9 +44,10 @@ ipAddrToAsciiEngine::~ipAddrToAsciiEngine ()
pItem->ioCompletionNotify ( this->nameTmp );
}
ipAddrToAsciiEngine::mutex.unlock ();
delete &thread;
}
void ipAddrToAsciiEngine::entryPoint ()
void ipAddrToAsciiEngine::run ()
{
osiSockAddr addr;
unsigned tmpId;
+4 -2
View File
@@ -17,6 +17,7 @@
#ifndef ipAddrToAsciiAsynchronous_h
#define ipAddrToAsciiAsynchronous_h
#include "epicsThread.h"
#include "epicsMutex.h"
#include "epicsEvent.h"
#include "tsDLList.h"
@@ -27,12 +28,14 @@ class ipAddrToAsciiAsynchronous;
// - this class executes the synchronous DNS query
// - it creates one thread
class ipAddrToAsciiEngine : public osiThread {
class ipAddrToAsciiEngine : public epicsThreadRunable {
public:
epicsShareFunc ipAddrToAsciiEngine ( const char *pName );
epicsShareFunc ~ipAddrToAsciiEngine ();
virtual void run();
epicsShareFunc void show ( unsigned level ) const;
private:
epicsThread &thread;
tsDLList < ipAddrToAsciiAsynchronous > labor;
epicsEvent event;
epicsEvent threadExit;
@@ -40,7 +43,6 @@ private:
unsigned nextId;
bool exitFlag;
static epicsMutex mutex;
void entryPoint ();
friend class ipAddrToAsciiAsynchronous;
};