#include <wefts_os_windows.h>
Inheritance diagram for Wefts::OSThreadWindows:
Public Member Functions | |
OSThreadWindows () | |
OSThreadWindows (bool val) | |
~OSThreadWindows () | |
virtual bool | priority (OSPriority prio_class, int boost=0) |
Sets WinAPI priority level and boost. | |
bool | start (void *(*func)(void *), void *data) |
bool | stop () |
void * | join () throw ( NotJoinableError ) |
int | enableCancel () |
We support only deferred emulated cancellation. | |
int | disableCancel () |
We support only deferred emulated cancellation. | |
bool | setCancelState (int state) |
virtual void * | osRun (void *(*func)(void *), void *data, void(*cleanup)(void *)) |
void | testCancel () |
void | setCancelDeferred () |
Always in emulated deferred mode. | |
void | detach () |
void | exit (void *data) |
bool | same () const |
bool | equal (const OSThreadBase &th) const |
virtual bool | setCurrent () |
virtual void | invalidate () |
Private Attributes | |
DWORD | m_thid |
windows thread id | |
HANDLE | m_hth |
Windows thread handle. | |
bool | m_valid |
true if this thread is considered valid | |
HANDLE | m_evtCancel |
cancellation control | |
bool | m_wasCanceled |
Used to reset cancel event after a section where cancellation is disabled. | |
bool | m_canCancel |
Kind cancellation control. | |
void(* | m_rawCleanup )(void *) |
Pointer to thread raw cleanup function. | |
void * | m_rawCleanData |
Pointer to thread raw cleanup data. | |
Friends | |
bool | OSSleep (long nSeconds, long nNanoseconds) |
Function to provide a wefts-interruptable wait. |
|
|
|
|
|
|
|
Implements Wefts::OSThreadBase. |
|
We support only deferred emulated cancellation.
Implements Wefts::OSThreadBase. |
|
We support only deferred emulated cancellation.
Implements Wefts::OSThreadBase. |
|
Implements Wefts::OSThreadBase. |
|
Implements Wefts::OSThreadBase. |
|
Implements Wefts::OSThreadBase. |
|
Implements Wefts::OSThreadBase. |
|
Implements Wefts::OSThreadBase. |
|
Sets WinAPI priority level and boost. Windows api sets thread priority class based on a differential status with respect to the process standard priority. This function supposes that the process is started with "normal" priority schedule, and then it sets the priority class of threads based on this assumption. Wefts users should not change the process default priority, but they should use Thread::priority() instead. In the specific: prio_class is set as the base thread priority value; boost adds or subtracts some point from the base class. Also, boost is set as Windows dynamic priority boost if it's in range 1..3; if it's higher than 3, dynamic priority boost is set to 3.
Implements Wefts::OSThreadBase. |
|
Implements Wefts::OSThreadBase. |
|
Always in emulated deferred mode.
Implements Wefts::OSThreadBase. |
|
Implements Wefts::OSThreadBase. |
|
Implements Wefts::OSThreadBase. |
|
Implements Wefts::OSThreadBase. |
|
Implements Wefts::OSThreadBase. |
|
Implements Wefts::OSThreadBase. |
|
Function to provide a wefts-interruptable wait.
|
|
Kind cancellation control.
|
|
cancellation control
|
|
Windows thread handle.
|
|
Pointer to thread raw cleanup data. This pointer holds generally a pointer to a Wefts::Thread or subclass, and is initializated in osRun() by functions in wefts_thread.c |
|
Pointer to thread raw cleanup function. This function is usually defined in wefts_thread.c and has the duty to call the high-level thread layer. |
|
windows thread id
|
|
true if this thread is considered valid
|
|
Used to reset cancel event after a section where cancellation is disabled. disableCancel will set this to true if the event that commands the thread to be canceled was set. Then if enableCancel is issued, the event is set again if it was set before. |