(svn r22405) -Document: some more "random-ish" tidbits
This commit is contained in:
@@ -12,8 +12,10 @@
|
||||
#ifndef THREAD_H
|
||||
#define THREAD_H
|
||||
|
||||
/** Definition of all thread entry functions. */
|
||||
typedef void (*OTTDThreadFunc)(void *);
|
||||
|
||||
/** Signal used for signalling we knowingly want to end the thread. */
|
||||
class OTTDThreadExitSignal { };
|
||||
|
||||
/**
|
||||
@@ -52,6 +54,9 @@ public:
|
||||
*/
|
||||
class ThreadMutex {
|
||||
public:
|
||||
/**
|
||||
* Create a new mutex.
|
||||
*/
|
||||
static ThreadMutex *New();
|
||||
|
||||
/**
|
||||
|
@@ -93,8 +93,8 @@ private:
|
||||
*/
|
||||
class ThreadMutex_OS2 : public ThreadMutex {
|
||||
private:
|
||||
HMTX mutex;
|
||||
HEV event;
|
||||
HMTX mutex; ///< The mutex.
|
||||
HEV event; ///< Event for waiting.
|
||||
|
||||
public:
|
||||
ThreadMutex_OS2()
|
||||
|
@@ -95,9 +95,9 @@ private:
|
||||
*/
|
||||
class ThreadMutex_pthread : public ThreadMutex {
|
||||
private:
|
||||
pthread_mutex_t mutex;
|
||||
pthread_cond_t condition;
|
||||
pthread_mutexattr_t attr;
|
||||
pthread_mutex_t mutex; ///< The actual mutex.
|
||||
pthread_cond_t condition; ///< Data for conditional waiting.
|
||||
pthread_mutexattr_t attr; ///< Attributes set for the mutex.
|
||||
|
||||
public:
|
||||
ThreadMutex_pthread()
|
||||
|
@@ -106,8 +106,8 @@ private:
|
||||
*/
|
||||
class ThreadMutex_Win32 : public ThreadMutex {
|
||||
private:
|
||||
CRITICAL_SECTION critical_section;
|
||||
HANDLE event;
|
||||
CRITICAL_SECTION critical_section; ///< The critical section we would enter.
|
||||
HANDLE event; ///< Event for signalling.
|
||||
|
||||
public:
|
||||
ThreadMutex_Win32()
|
||||
|
Reference in New Issue
Block a user