threads: construct Thread only with a given "parent"
[c11tester.git] / threads-model.h
index fd0314ad6b9fa34ac5a42c0fd9cfd94f6f552753..2cd09ab53739de7d327de3e5758af6b7ba66465d 100644 (file)
@@ -41,7 +41,7 @@ class ModelAction;
 class Thread {
 public:
        Thread(thread_id_t tid);
-       Thread(thrd_t *t, void (*func)(void *), void *a);
+       Thread(thrd_t *t, void (*func)(void *), void *a, Thread *parent);
        ~Thread();
        void complete();
 
@@ -128,7 +128,7 @@ private:
        int create_context();
 
        /** @brief The parent Thread which created this Thread */
-       Thread *parent;
+       Thread * const parent;
 
        /** @brief The THREAD_CREATE ModelAction which created this Thread */
        ModelAction *creation;