pthread_waitable_bool.hpp

00001 #line 1172 "./lpsrc/flx_pthread.pak"
00002 #ifndef __FLX_PTHREAD_WAIT_BOOL_H__
00003 #define __FLX_PTHREAD_WAIT_BOOL_H__
00004 #include <flx_pthread_config.hpp>
00005 #include "pthread_mutex.hpp"  // mutexes
00006 #include "pthread_condv.hpp"  // condition var for same
00007 
00008 namespace flx { namespace pthread {
00009 
00010 // a waitable boolean.
00011 class PTHREAD_EXTERN waitable_bool {
00012   flx::pthread::flx_mutex_t cv_lock;       // to work with the condition var
00013   flx::pthread::flx_condv_t finished_cond;
00014   bool finished;   // might seem redundant, but that's how CVs work.
00015 public:
00016   waitable_bool();
00017 
00018   void wait_until_true();
00019   void signal_true();
00020 };
00021 
00022 }} // namespace pthread, flx
00023 #endif // __FLX_PTHREAD_WAIT_BOOL_H__
00024 

Generated on Fri Dec 19 05:34:06 2008 for Felix by  doxygen 1.5.7.1