1
/***************************************************************************
2
cthread.h - description
4
begin : Sun Sep 30 2001
5
copyright : (C) 2001-2003 by Mathias K�ster
6
email : mathen@users.berlios.de
7
***************************************************************************/
9
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
***************************************************************************/
22
*@author Mathias K�ster
27
#include <dclib/dcos.h>
28
#include <dclib/core/cobject.h>
32
class DLL_EXPORT CMutex {
48
pthread_mutex_t mutex;
51
class DLL_EXPORT CThread : public CMutex {
61
int Stop( bool bHard = TRUE );
66
void NanoSleep( unsigned int );
68
void SetThreadCallBackFunction( _CCallback * callback );
71
virtual void Thread(CObject *) {};
79
/** callback function */
80
_CCallback * _thread_callback_function;
86
static void * MainThread(void *object);
90
inline bool CThread::Stopped() const
91
{ return (iStop==1); }