OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
ThreadObject_OS2 Class Reference

OS/2 version for ThreadObject. More...

Inheritance diagram for ThreadObject_OS2:

## Public Member Functions
| ThreadObject_OS2 (OTTDThreadFunc proc, void *param, bool self_destruct)
| Create a thread and start it, calling proc(param).
bool | Exit ()
| Exit this thread.
void | Join ()
| Join this thread.
Public Member Functions inherited from ThreadObject
virtual | ~ThreadObject ()
| Virtual destructor to allow 'delete' operator to work properly.

## Private Member Functions
void | ThreadProc ()
| A new thread is created, and this function is called.

## Static Private Member Functions
static void | stThreadProc (void *thr)
| On thread creation, this function is called, which calls the real startup function.

## Private Attributes
TID | thread
| System thread identifier.
OTTDThreadFunc | proc
| External thread procedure.
void * | param
| Parameter for the external thread procedure.
bool | self_destruct
| Free ourselves when done?

## Additional Inherited Members
Static Public Member Functions inherited from ThreadObject
static bool | New (OTTDThreadFunc proc, void *param, ThreadObject **thread=NULL, const char *name=NULL)
| Create a thread; proc will be called as first function inside the thread, with optional params.

## Detailed Description

OS/2 version for ThreadObject.

Definition at line 24 of file thread_os2.cpp.

## Member Function Documentation

static void ThreadObject_OS2::stThreadProc | ( | void * | thr | ) |
| inline static private

On thread creation, this function is called, which calls the real startup function.

This to get back into the correct instance again.

Definition at line 60 of file thread_os2.cpp.

Referenced by ThreadObject_OS2().

void ThreadObject_OS2::ThreadProc | ( |  | ) |
| inline private

A new thread is created, and this function is called.

Call the custom function of the creator of the thread.

Definition at line 69 of file thread_os2.cpp.

References Exit(), param, proc, and self_destruct.

The documentation for this class was generated from the following file:

- src/thread/thread_os2.cpp