GlobalObjects
Loading...
Searching...
No Matches
EuEndlessPThread.h
Go to the documentation of this file.
1#ifndef INC_EUENDLESSPTHREAD_H
2#define INC_EUENDLESSPTHREAD_H
3//-----------------------------------------------------------------------------
51//-----------------------------------------------------------------------------
52#include "EuAPThread.h"
53#include <semaphore.h>
54//-----------------------------------------------------------------------------
83class __euthread_export_dll EuEndlessPThread : public EuAPThread
84{
85 public:
86 //============== local enums
87 //-------------------------------------------------------------------------
132 //-------------------------------------------------------------------------
133
134 protected:
135 //============== Attribute
136 //-------------------------------------------------------------------------
147 //-------------------------------------------------------------------------
157 pthread_mutex_t m_ExclusiveAccessMutex;
158 //-------------------------------------------------------------------------
168 pthread_cond_t m_BreakCond;
169 //-------------------------------------------------------------------------
183 //-------------------------------------------------------------------------
201 //-------------------------------------------------------------------------
212 //-------------------------------------------------------------------------
213
214 public:
215 //============== De- & Konstruktoren
216 //-------------------------------------------------------------------------
227 //-------------------------------------------------------------------------
250 //-------------------------------------------------------------------------
251
252 private:
253 //============== Copy-Konstruktor
254 //-------------------------------------------------------------------------
265 //-------------------------------------------------------------------------
266
267 protected:
268 //========== Static Thread-Methode ========
269 //-------------------------------------------------------------------------
287 static void * threadWork( void * pParam );
288 //-------------------------------------------------------------------------
289
290 //========== Methoden ========
291 //-------------------------------------------------------------------------
302 //-------------------------------------------------------------------------
303
304 public:
305 //========== Methoden ========
306 //-------------------------------------------------------------------------
324 virtual int start();
325 //-------------------------------------------------------------------------
345 virtual int cancel();
346 //-------------------------------------------------------------------------
358 //-------------------------------------------------------------------------
369 //-------------------------------------------------------------------------
380 //-------------------------------------------------------------------------
396 virtual int takeABreak();
397 //-------------------------------------------------------------------------
411 virtual int finishBreak();
412 //-------------------------------------------------------------------------
425 //-------------------------------------------------------------------------
437 //-------------------------------------------------------------------------
438
439 private:
440 //============== Operatoren
441 //-------------------------------------------------------------------------
452 //-------------------------------------------------------------------------
453};
454#endif
Header for EuAPThread
Abstract superclass for threads.
Definition EuAPThread.h:88
EuAPThread & operator=(const EuAPThread &)
Base class for a thread that executes its work endlessly until aborted.
Definition EuEndlessPThread.h:84
virtual int finishBreak()
void unsetExclusiveAccess()
void setExclusiveAccess()
EuEndlessPThread(const EuEndlessPThread &)
virtual int cancel()
pthread_cond_t m_BreakCond
Definition EuEndlessPThread.h:168
EuPTHREAD_ORDER
Definition EuEndlessPThread.h:99
@ EuPTHREAD_WORK
Definition EuEndlessPThread.h:109
@ EuPTHREAD_TAKE_A_BREAK
Definition EuEndlessPThread.h:120
sem_t m_Semaphore
Definition EuEndlessPThread.h:182
virtual ~EuEndlessPThread()
virtual int start()
static void * threadWork(void *pParam)
pthread_mutex_t m_ExclusiveAccessMutex
Definition EuEndlessPThread.h:157
bool m_bInExluzivAccess
Definition EuEndlessPThread.h:211
EuPTHREAD_ORDER m_eThreadOrder
Definition EuEndlessPThread.h:146
virtual int takeABreak()
int m_iBreakCounter
Definition EuEndlessPThread.h:200