STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Types | Static Private Member Functions | Private Attributes | List of all members
_Pad Class Referenceabstract
Inheritance diagram for _Pad:
_LaunchPad< _Target >

Public Member Functions

 _Pad ()
 
 ~_Pad () _NOEXCEPT
 
void _Launch (_Thrd_t *_Thr)
 
void _Release ()
 
virtual void _Go ()=0
 

Private Types

typedef unsigned int _Call_func_ret
 

Static Private Member Functions

static _Call_func_ret _STDCALL _Call_func (void *_Data)
 

Private Attributes

_Cnd_t _Cond
 
_Mtx_t _Mtx
 
bool _Started
 

Member Typedef Documentation

typedef unsigned int _Pad::_Call_func_ret
private

Constructor & Destructor Documentation

_Pad::_Pad ( )
inline
169  { // initialize handshake
170  _Cnd_initX(&_Cond);
171  _Auto_cnd _Cnd_cleaner(_Cond);
173  _Auto_mtx _Mtx_cleaner(_Mtx);
174  _Started = false;
175  _Mtx_lockX(_Mtx);
176  _Mtx_cleaner._Release();
177  _Cnd_cleaner._Release();
178  }
int _Mtx_lockX(_Mtx_t _Mtx)
Definition: xthread:69
Definition: xthread:115
_Mtx_t _Mtx
Definition: xthread:215
_Cnd_t _Cond
Definition: xthread:214
int _Mtx_initX(_Mtx_t *_Mtx, int _Type)
Definition: xthread:64
int _Cnd_initX(_Cnd_t *_Cnd)
Definition: xthread:89
Definition: xthreads.h:44
Definition: xthread:139
bool _Started
Definition: xthread:216
_Pad::~_Pad ( )
inline
181  { // clean up handshake; non-virtual due to type-erasure
182  _Auto_cnd _Cnd_cleaner(_Cond);
183  _Auto_mtx _Mtx_cleaner(_Mtx);
185  }
Definition: xthread:115
int _Mtx_unlockX(_Mtx_t _Mtx)
Definition: xthread:84
_Mtx_t _Mtx
Definition: xthread:215
_Cnd_t _Cond
Definition: xthread:214
Definition: xthread:139

Member Function Documentation

static _Call_func_ret _STDCALL _Pad::_Call_func ( void _Data)
inlinestaticprivate
209  { // entry point for new thread
210  static_cast<_Pad *>(_Data)->_Go();
211  return (0);
212  }
virtual void _Go()=0
Definition: xthread:165
virtual void _Pad::_Go ( )
pure virtual

Implemented in _LaunchPad< _Target >.

void _Pad::_Launch ( _Thrd_t _Thr)
inline
188  { // launch a thread
189  _Thrd_startX(_Thr, _Call_func, this);
190  while (!_Started)
192  }
int _Thrd_startX(_Thrd_imp_t *_Thr, _Thrd_callback_t _Fp, void *_Arg)
Definition: xthread:48
_Mtx_t _Mtx
Definition: xthread:215
static _Call_func_ret _STDCALL _Call_func(void *_Data)
Definition: xthread:208
_Cnd_t _Cond
Definition: xthread:214
bool _Started
Definition: xthread:216
int _Cnd_waitX(_Cnd_t _Cnd, _Mtx_t _Mtx)
Definition: xthread:94
void _Pad::_Release ( )
inline
195  { // notify caller that it's okay to continue
196  _Mtx_lockX(_Mtx);
197  _Started = true;
200  }
int _Mtx_lockX(_Mtx_t _Mtx)
Definition: xthread:69
int _Mtx_unlockX(_Mtx_t _Mtx)
Definition: xthread:84
_Mtx_t _Mtx
Definition: xthread:215
_Cnd_t _Cond
Definition: xthread:214
int _Cnd_signalX(_Cnd_t _Cnd)
Definition: xthread:110
bool _Started
Definition: xthread:216

Member Data Documentation

_Cnd_t _Pad::_Cond
private
_Mtx_t _Pad::_Mtx
private
bool _Pad::_Started
private

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