Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

wefts_moaning.h

Go to the documentation of this file.
00001 /*
00002    wefts_moaning.h
00003    Moaning thread abstract class
00004 
00005    $Id: wefts_moaning.h,v 1.2 2003/08/05 15:40:20 jonnymind Exp $
00006 ---------------------------------------------
00007    Begin      : 2003-08-04 18:00
00008    Author     : Giancarlo Niccolai
00009 
00010    Last modified because:
00011 
00012 */
00013 
00014 /**************************************************************************
00015 *   This program is free software; you can redistribute it and/or modify  *
00016 *   it under the terms of the GNU Library General Public License as       *
00017 *   published by the Free Software Foundation; either version 2.1 of the  *
00018 *   License, or (at your option) any later version.                       *
00019 ***************************************************************************/
00020 
00021 #ifndef WT_MOANING_H
00022 #define WT_MOANING_H
00023 
00024 #ifdef __extern_c
00025 extern "C" {
00026 #endif
00027 
00028 #include <pthread.h>
00029 
00030 #ifdef __extern_c
00031 }
00032 #endif
00033 
00034 #include <wefts_fastcond.h>
00035 #include <wefts_thread.h>
00036 
00037 namespace Wefts {
00038 
00122 class MoaningThread: public Thread
00123 {
00124 
00125 private:
00127    bool m_canJoin;
00129    volatile int m_joiners;
00130 
00131 protected:
00133    FastCondition m_cond;
00134 
00142    int joiners() { return m_joiners; }
00143 
00157    void blockJoiners();
00158 
00159 public:
00161    MoaningThread();
00162 
00176    void *join();
00177 
00178 
00191    virtual void cleanup();
00192 
00193 };
00194 
00195 }
00196 
00197 #endif
00198 /* end of wefts_moaning.h */

Generated on Tue Aug 5 18:09:00 2003 for Wefts by doxygen1.2.18