X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=action.h;h=cebbec1beb6ba7d3f409673e92a214b792c8e623;hb=bac8bc0661e904fc2b1b9aba07d239679483b2b4;hp=b4fb80fc4bf81ac8bb38c0a2a9b3bdd336cf679b;hpb=0dbf7f2dd8d6cb6ffdbb5ffaf6329e9ca4b8d913;p=c11tester.git diff --git a/action.h b/action.h index b4fb80fc..cebbec1b 100644 --- a/action.h +++ b/action.h @@ -11,7 +11,7 @@ #include "mymemory.h" #include "memoryorder.h" #include "modeltypes.h" -#include "pthread.h" +#include "mypthread.h" #include "classlist.h" namespace cdsc { @@ -70,7 +70,7 @@ typedef enum action_type { ATOMIC_NOTIFY_ALL, // < A notify all action ATOMIC_WAIT, // < A wait action ATOMIC_ANNOTATION, // < An annotation action to pass information to a trace analysis - NOOP + NOOP // no operation, which returns control to scheduler } action_type_t; @@ -86,6 +86,7 @@ class ModelAction { public: ModelAction(action_type_t type, memory_order order, void *loc, uint64_t value = VALUE_NONE, Thread *thread = NULL); ModelAction(action_type_t type, memory_order order, void *loc, uint64_t value, int size); + ModelAction(action_type_t type, const char * position, memory_order order, void *loc, uint64_t value = VALUE_NONE, Thread *thread = NULL); ~ModelAction(); void print() const; @@ -95,6 +96,7 @@ public: memory_order get_original_mo() const { return original_order; } void set_mo(memory_order order) { this->order = order; } void * get_location() const { return location; } + const char * get_position() const { return position; } modelclock_t get_seq_number() const { return seq_number; } uint64_t get_value() const { return value; } uint64_t get_reads_from_value() const; @@ -174,7 +176,7 @@ public: /* to accomodate pthread create and join */ Thread * thread_operand; void set_thread_operand(Thread *th) { thread_operand = th; } - MEMALLOC + SNAPSHOTALLOC private: const char * get_type_str() const; const char * get_mo_str() const; @@ -182,6 +184,9 @@ private: /** @brief A pointer to the memory location for this action. */ void *location; + /** @brief A pointer to the source line for this atomic action. */ + const char * position; + union { /** * @brief The store that this action reads from