Do not allow a thread to stash the next pending action if its last action was a SLEEP...
[c11tester.git] / threads-model.h
index e2084abf5008e071bb4cd09e55b3d95a71b3a326..f2162a89e55752ffde61e74ebf3f0c675584d4ba 100644 (file)
@@ -93,6 +93,9 @@ public:
         *  @see Thread::pending */
        void set_pending(ModelAction *act) { pending = act; }
 
+       bool just_woken_up() { return wakeup_state; }
+       void set_wakeup_state(bool state) { wakeup_state = state; }
+
        Thread * waiting_on() const;
        bool is_waiting_on(const Thread *t) const;
 
@@ -144,6 +147,9 @@ private:
         */
        ModelAction *pending;
 
+       /** @brief True if this thread was just woken up */
+       bool wakeup_state;
+
        void (*start_routine)(void *);
        void *(*pstart_routine)(void *);