37 #include "dcmtk/config/osconfig.h" 38 #include "dcmtk/ofstd/oftypes.h" 39 #include "dcmtk/ofstd/ofstring.h" 48 unsigned int __stdcall thread_stub(
void *arg);
50 void *thread_stub(
void *arg);
124 OFBool
equal(
unsigned long tID);
157 static unsigned long self();
168 virtual void run() = 0;
170 #ifdef HAVE_WINDOWS_H 172 unsigned long theThreadHandle;
176 #ifdef HAVE_POINTER_TYPE_PTHREAD_T 189 #ifdef HAVE_WINDOWS_H 190 friend unsigned int __stdcall
thread_stub(
void *arg);
221 OFBool initialized()
const;
229 int set(
void *value);
237 int get(
void *&value);
249 #ifdef HAVE_CXX_VOLATILE 267 #ifndef _DARWIN_C_SOURCE 292 OFBool initialized()
const;
329 #ifdef HAVE_CXX_VOLATILE 342 #endif // _DARWIN_C_SOURCE 365 OFBool initialized()
const;
407 #ifdef HAVE_CXX_VOLATILE 440 OFBool initialized()
const;
497 #ifdef HAVE_CXX_VOLATILE OFBool locked
did we sucessfully lock the lock?
static const int busy
this constant is returned by the trylock() method if the mutex is already locked. ...
OFReadWriteLock & theLock
the lock on which we are operating
static const int busy
this constant is returned by the tryrdlock() and trywrlock() methods if the read/write lock is alread...
OFThread()
default constructor.
void * theKey
thread specific data key resource
static void thread_exit()
terminates the calling thread, in a similar way that exit() terminates the calling process...
provides an operating system independent abstraction for semaphores.
static const int busy
this constant is returned by the join() method if another thread is already waiting for termination o...
int join()
blocks the calling thread until the thread referenced by the OFThread object terminates.
friend void * thread_stub(void *arg)
thread stub must be friend to call run()
void * theLock
read/write lock resource
OFThread & operator=(const OFThread &arg)
unimplemented private assignment operator
This class aims to provide an easy way for making sure OFReadWriteLocks are unlocked in an exception ...
virtual ~OFThread()
destructor.
virtual void run()=0
this method implements the thread that is run by calling the start method of the OFThread object...
static void errorstr(OFString &description, int code)
converts any of the error codes returned by the methods of this class into a textual description...
OFBool equal(unsigned long tID)
checks if the given thread ID matches the thread ID of the thread referenced by this object...
provides an operating system independent abstraction for mutexes (mutual exclusion locks)...
provides an operating system independent abstraction for thread specific data.
void * theMutex
mutex resource
int start()
adds a new thread of control to the current process.
static const int busy
this constant is returned by the trywait() method if the semaphore is already locked.
provides an operating system independent abstraction for threads.
a simple string class that implements a subset of std::string.
provides an operating system independent abstraction for read/write locks.
unsigned long threadID()
returns the thread identifier of the thread referenced by the OFThread object, if the thread has alre...
void * theSemaphore
semaphore resource
unsigned long theThread
thread identifier