pthread_monitor.hpp
00001 #line 1069 "./lpsrc/flx_pthread.pak"
00002 #ifndef __FLX_PTHREAD_MONITOR_H__
00003 #define __FLX_PTHREAD_MONITOR_H__
00004 #include <flx_pthread_config.hpp>
00005 #include "pthread_mutex.hpp"
00006 #include "pthread_condv.hpp"
00007 #include "pthread_semaphore.hpp"
00008
00009
00010
00011
00012 namespace flx { namespace pthread {
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 class PTHREAD_EXTERN monitor_t {
00032 flx_mutex_t m;
00033 flx_mutex_t rm;
00034 flx_mutex_t wm;
00035 int dataput;
00036 int datagot;
00037 flx_condv_t ack;
00038 void *data;
00039 public:
00040 monitor_t();
00041 ~monitor_t();
00042 void enqueue(void*);
00043 void* dequeue();
00044 };
00045
00046 }}
00047 #endif
00048