GlobalObjects
Lade ...
Suche ...
Keine Treffer
EuEndlessPThread.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_EUENDLESSPTHREAD_H
2#define INC_EUENDLESSPTHREAD_H
3//-----------------------------------------------------------------------------
36//-----------------------------------------------------------------------------
37#include "EuAPThread.h"
38#include <semaphore.h>
39//-----------------------------------------------------------------------------
68class __euthread_export_dll EuEndlessPThread : public EuAPThread
69{
70 public:
71 //============== local enums
72 //-------------------------------------------------------------------------
117 //-------------------------------------------------------------------------
118
119 protected:
120 //============== Attribute
121 //-------------------------------------------------------------------------
132 //-------------------------------------------------------------------------
142 pthread_mutex_t m_ExclusiveAccessMutex;
143 //-------------------------------------------------------------------------
153 pthread_cond_t m_BreakCond;
154 //-------------------------------------------------------------------------
168 //-------------------------------------------------------------------------
186 //-------------------------------------------------------------------------
197 //-------------------------------------------------------------------------
198
199 public:
200 //============== De- & Konstruktoren
201 //-------------------------------------------------------------------------
212 //-------------------------------------------------------------------------
235 //-------------------------------------------------------------------------
236
237 private:
238 //============== Copy-Konstruktor
239 //-------------------------------------------------------------------------
250 //-------------------------------------------------------------------------
251
252 protected:
253 //========== Static Thread-Methode ========
254 //-------------------------------------------------------------------------
272 static void * threadWork( void * pParam );
273 //-------------------------------------------------------------------------
274
275 //========== Methoden ========
276 //-------------------------------------------------------------------------
287 //-------------------------------------------------------------------------
288
289 public:
290 //========== Methoden ========
291 //-------------------------------------------------------------------------
309 virtual int start();
310 //-------------------------------------------------------------------------
330 virtual int cancel();
331 //-------------------------------------------------------------------------
343 //-------------------------------------------------------------------------
354 //-------------------------------------------------------------------------
365 //-------------------------------------------------------------------------
381 virtual int takeABreak();
382 //-------------------------------------------------------------------------
396 virtual int finishBreak();
397 //-------------------------------------------------------------------------
410 //-------------------------------------------------------------------------
422 //-------------------------------------------------------------------------
423
424 private:
425 //============== Operatoren
426 //-------------------------------------------------------------------------
437 //-------------------------------------------------------------------------
438};
439#endif
Header für EuAPThread
Abstrakte Oberklasse für Threads.
Definition EuAPThread.h:73
EuAPThread & operator=(const EuAPThread &)
Basisklasse für einen Thread der seine Arbeit endlos bis zum Abbruch ausführt.
Definition EuEndlessPThread.h:69
virtual int finishBreak()
void unsetExclusiveAccess()
void setExclusiveAccess()
EuEndlessPThread(const EuEndlessPThread &)
virtual int cancel()
pthread_cond_t m_BreakCond
Definition EuEndlessPThread.h:153
EuPTHREAD_ORDER
Definition EuEndlessPThread.h:84
@ EuPTHREAD_WORK
Definition EuEndlessPThread.h:94
@ EuPTHREAD_TAKE_A_BREAK
Definition EuEndlessPThread.h:105
sem_t m_Semaphore
Definition EuEndlessPThread.h:167
virtual ~EuEndlessPThread()
virtual int start()
static void * threadWork(void *pParam)
pthread_mutex_t m_ExclusiveAccessMutex
Definition EuEndlessPThread.h:142
bool m_bInExluzivAccess
Definition EuEndlessPThread.h:196
EuPTHREAD_ORDER m_eThreadOrder
Definition EuEndlessPThread.h:131
virtual int takeABreak()
int m_iBreakCounter
Definition EuEndlessPThread.h:185