X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=mutex.h;h=53fccb2b89a8974fb26ed8d60f4f1262d3c23396;hp=1c6c3f3624fc1f9f31b4fa8331a756ea1eebee34;hb=af25bde59ce05189adee92825ecc03fbb83e675b;hpb=16ef61e0af2f98a34acaa919077def37ece3b5bd diff --git a/mutex.h b/mutex.h index 1c6c3f36..53fccb2b 100644 --- a/mutex.h +++ b/mutex.h @@ -1,8 +1,15 @@ #ifndef MUTEX_H #define MUTEX_H -#include "threads.h" + +#include "modeltypes.h" namespace std { + struct mutex_state { + bool islocked; + thread_id_t alloc_tid; + modelclock_t alloc_clock; + }; + class mutex { public: mutex(); @@ -10,9 +17,10 @@ namespace std { void lock(); bool try_lock(); void unlock(); + struct mutex_state * get_state() {return &state;} + private: - thread_id_t owner; - bool islocked; + struct mutex_state state; }; } #endif