- SimcallObserver* clone() override
- {
- auto res = new RandomSimcall(get_issuer(), min_, max_);
- res->next_value_ = next_value_;
- return res;
- }
-};
-
-class MutexUnlockSimcall : public SimcallObserver {
- using SimcallObserver::SimcallObserver;
-
-public:
- SimcallObserver* clone() override { return new MutexUnlockSimcall(get_issuer()); }
- std::string to_string(int times_considered) const override;
- std::string dot_label() const override;
-};
-
-class MutexLockSimcall : public SimcallObserver {
- activity::MutexImpl* const mutex_;
- const bool blocking_;
-
-public:
- MutexLockSimcall(smx_actor_t actor, activity::MutexImpl* mutex, bool blocking = true)
- : SimcallObserver(actor), mutex_(mutex), blocking_(blocking)
- {
- }
- SimcallObserver* clone() override { return new MutexLockSimcall(get_issuer(), mutex_, blocking_); }
- bool is_enabled() const override;
- std::string to_string(int times_considered) const override;
- std::string dot_label() const override;
- activity::MutexImpl* get_mutex() const { return mutex_; }