projects
/
c11tester.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add support for pthread_mutex
[c11tester.git]
/
include
/
mutex
diff --git
a/include/mutex
b/include/mutex
index bd65a78a57647200dcc7e49a64dabcf3ffd41a4a..734ec124502a496c9871527deccacd30deaa3109 100644
(file)
--- a/
include/mutex
+++ b/
include/mutex
@@
-13,6
+13,7
@@
namespace std {
void *locked; /* Thread holding the lock */
thread_id_t alloc_tid;
modelclock_t alloc_clock;
void *locked; /* Thread holding the lock */
thread_id_t alloc_tid;
modelclock_t alloc_clock;
+ int init; // WL
};
class mutex {
};
class mutex {
@@
-23,6
+24,8
@@
namespace std {
bool try_lock();
void unlock();
struct mutex_state * get_state() {return &state;}
bool try_lock();
void unlock();
struct mutex_state * get_state() {return &state;}
+ void initialize() { state.init = 1; } // WL
+ bool is_initialized() { return state.init == 1; }
private:
struct mutex_state state;
private:
struct mutex_state state;