projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
main: fixup parameter parsing for user program
[model-checker.git]
/
threads-model.h
diff --git
a/threads-model.h
b/threads-model.h
index 28d237d47c9125f2c68ebae2a7e9e85035d444d7..b99b279b8ece6cccc916f227d228464112967254 100644
(file)
--- a/
threads-model.h
+++ b/
threads-model.h
@@
-10,7
+10,7
@@
#include <vector>
#include "mymemory.h"
#include <vector>
#include "mymemory.h"
-#include
"libthreads.h"
+#include
<threads.h>
#include "modeltypes.h"
/** @brief Represents the state of a user Thread */
#include "modeltypes.h"
/** @brief Represents the state of a user Thread */
@@
-151,11
+151,21
@@
static inline thread_id_t thrd_to_id(thrd_t t)
return t;
}
return t;
}
+/**
+ * @brief Map a zero-based integer index to a unique thread ID
+ *
+ * This is the inverse of id_to_int
+ */
static inline thread_id_t int_to_id(int i)
{
return i;
}
static inline thread_id_t int_to_id(int i)
{
return i;
}
+/**
+ * @brief Map a unique thread ID to a zero-based integer index
+ *
+ * This is the inverse of int_to_id
+ */
static inline int id_to_int(thread_id_t id)
{
return id;
static inline int id_to_int(thread_id_t id)
{
return id;