(svn r22405) -Document: some more "random-ish" tidbits

This commit is contained in:
rubidium
2011-05-01 19:14:12 +00:00
parent b27dd1dcd7
commit 1a515e6344
35 changed files with 173 additions and 58 deletions

View File

@@ -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();
/**

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()