mspace_malloc will call into mmap if it runs out of memory... this does not play...
[c11tester.git] / promise.h
index d729e0309868846425d0c439962187b7aa83de44..11719fc3b2c291307f61e9480205265436ca7b48 100644 (file)
--- a/promise.h
+++ b/promise.h
@@ -13,15 +13,18 @@ class ModelAction;
 
 class Promise {
  public:
      Promise(ModelAction *act, uint64_t value) :
-               value(value), read(act), numthreads(1)
Promise(ModelAction *act, uint64_t value, modelclock_t expiration) :
+       value(value), expiration(expiration), read(act), numthreads(1)
        { }
+       modelclock_t get_expiration() const {return expiration;}
        ModelAction * get_action() const { return read; }
        int increment_threads() { return ++numthreads; }
        uint64_t get_value() const { return value; }
 
+       SNAPSHOTALLOC
  private:
        const uint64_t value;
+       const modelclock_t expiration;
        ModelAction * const read;
        unsigned int numthreads;
 };