blob: 80b7a308ddf02c193bfab1ea19683b003181091a [file] [log] [blame]
//===---------------- Cond.h - Threads conditions -------------------------===//
//
// The Micro Virtual Machine
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef MVM_COND_H
#define MVM_COND_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "mvm/GC/GC.h"
#include "mvm/Threads/Locks.h"
namespace mvm {
class Cond {
unsigned int no_barrier;
unsigned int go;
unsigned int n_wait;
public:
static Cond *allocCond(void);
void broadcast(void);
void wait(Lock *l);
int timed_wait(Lock *l, struct timeval *tv);
void signal(void);
};
} // end namespace mvm
#endif // MVM_COND_H