add some comments
[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         ModelAction * get_action() { return read; }
18         int increment_threads() { return ++numthreads; }
19         uint64_t get_value() { return value; }
20         
21  private:
22         uint64_t value;
23         ModelAction *read;
24         unsigned int numthreads;
25 };
26
27 #endif