#ifndef SCHED_HPP #define SCHED_HPP #include #include class SchedEntry { private: friend class Schedule; int64_t clock_; int64_t thread_id_; int64_t place_id_; public: int64_t clock() const { return clock_; } int64_t thread_id() const { return thread_id_; } int64_t place_id() const { return place_id_; } SchedEntry(int64_t clk, int64_t thid, int64_t plid) { clock_ = clk; thread_id_ = thid; place_id_ = plid; } bool operator < (const SchedEntry &other) const; }; class Schedule { private: std::set schedule_; public: void add(int64_t clk, int64_t thid, int64_t plid); bool ready(int64_t clk) const; SchedEntry pop(); }; #endif // SCHED_HPP