projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clockvector: add documentation
[model-checker.git]
/
threads.h
diff --git
a/threads.h
b/threads.h
index 57319067b4adb74255435cb721d723650900153c..a97a04c704449963981fe443a711c64abc716fb3 100644
(file)
--- a/
threads.h
+++ b/
threads.h
@@
-1,3
+1,7
@@
+/** @file threads.h
+ * @brief Model Checker Thread class.
+ */
+
#ifndef __THREADS_H__
#define __THREADS_H__
#ifndef __THREADS_H__
#define __THREADS_H__
@@
-16,6
+20,9
@@
typedef enum thread_state {
THREAD_COMPLETED
} thread_state;
THREAD_COMPLETED
} thread_state;
+class ModelAction;
+
+/** @brief A Thread is created for each user-space thread */
class Thread {
public:
Thread(thrd_t *t, void (*func)(void *), void *a);
class Thread {
public:
Thread(thrd_t *t, void (*func)(void *), void *a);
@@
-30,11
+37,17
@@
public:
thread_id_t get_id();
thrd_t get_thrd_t() { return *user_thread; }
Thread * get_parent() { return parent; }
thread_id_t get_id();
thrd_t get_thrd_t() { return *user_thread; }
Thread * get_parent() { return parent; }
- friend void thread_startup();
- MEMALLOC
+
+ void set_creation(ModelAction *act) { creation = act; }
+ ModelAction * get_creation() { return creation; }
+
+ friend void thread_startup();
+
+ SNAPSHOTALLOC
private:
int create_context();
Thread *parent;
private:
int create_context();
Thread *parent;
+ ModelAction *creation;
void (*start_routine)(void *);
void *arg;
void (*start_routine)(void *);
void *arg;