r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / guicast / condition.h
blobd96951d0b79825044a5d6a20a5bdd7e000a0dbbd
1 #ifndef CONDITION_H
2 #define CONDITION_H
4 #include <pthread.h>
6 class Condition
8 public:
9 Condition(int init_value = 0);
10 ~Condition();
12 // Block if value <= 0, then decrease value
13 void lock();
14 // Increase value
15 void unlock();
16 int timed_lock(int milliseconds);
18 pthread_cond_t cond;
19 pthread_mutex_t mutex;
20 int value;
24 #endif