X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=action.h;h=35368ef7fff3ca0bea12de7b375260e331cbded1;hb=884ebb4495edcb6fed84c0b4746b882bb0918ddc;hp=9486c9df7b39a4835ed345133b64fa73467c223b;hpb=4d1d81928c3688fbcfb96ee68eab70e73f7771e5;p=c11tester.git diff --git a/action.h b/action.h index 9486c9df..35368ef7 100644 --- a/action.h +++ b/action.h @@ -34,6 +34,7 @@ using std::memory_order_seq_cst; * iteself does not indicate no value. */ #define VALUE_NONE 0xdeadbeef +#define WRITE_REFERENCED ((void *)0x1) /** * @brief The "location" at which a fence occurs @@ -77,6 +78,8 @@ typedef enum action_type { ATOMIC_WAIT, // < A wait action ATOMIC_TIMEDWAIT, // < A timed wait action ATOMIC_ANNOTATION, // < An annotation action to pass information to a trace analysis + READY_FREE, // < Write is ready to be freed + ATOMIC_NOP // < Placeholder } action_type_t; @@ -100,6 +103,8 @@ public: thread_id_t get_tid() const { return tid; } action_type get_type() const { return type; } + void set_type(action_type _type) { type = _type; } + void set_free() { type = READY_FREE; } memory_order get_mo() const { return order; } memory_order get_original_mo() const { return original_order; } void set_mo(memory_order order) { this->order = order; } @@ -134,6 +139,7 @@ public: bool is_trylock() const; bool is_unlock() const; bool is_wait() const; + bool is_create() const; bool is_notify() const; bool is_notify_one() const; bool is_success_lock() const; @@ -141,6 +147,7 @@ public: bool is_atomic_var() const; bool is_read() const; bool is_write() const; + bool is_free() const; bool is_yield() const; bool could_be_write() const; bool is_rmwr() const; @@ -191,6 +198,7 @@ public: sllnode * getTraceRef() { return trace_ref; } sllnode * getThrdMapRef() { return thrdmap_ref; } sllnode * getActionRef() { return action_ref; } + SNAPSHOTALLOC private: const char * get_type_str() const; @@ -229,7 +237,6 @@ private: sllnode * thrdmap_ref; sllnode * action_ref; - /** @brief The value written (for write or RMW; undefined for read) */ uint64_t value;