changes
[model-checker.git] / promise.h
1 /** @file promise.h
2  *
3  *  @brief Promise class --- tracks future obligations for execution
4  *  related to weakly ordered writes.
5  */
6
7 #ifndef __PROMISE_H__
8 #define __PROMISE_H__
9 #include <inttypes.h>
10
11
12 class ModelAction;
13
14 class Promise {
15  public:
16         Promise(ModelAction * act, uint64_t value);
17         const ModelAction * get_action() { return read; }
18         int increment_threads() { return ++numthreads; }
19         
20  private:
21         uint64_t value;
22         ModelAction *read;
23         unsigned int numthreads;
24 };
25
26 #endif