2020#include " reactor.hh"
2121#include " time.hh"
2222#include " time_barrier.hh"
23- #include < unistd.h>
2423
2524namespace reactor {
2625
@@ -111,12 +110,14 @@ protected:
111110
112111 EnclaveConnection (const std::string& name, Environment* enclave, const Duration& delay)
113112 : BaseDelayedConnection<T>(name, enclave, false , delay)
114- , log_{this ->fqn ()} {}
113+ , log_{this ->fqn ()}
114+ , logical_time_barrier_(enclave->scheduler ()) {}
115115
116116public:
117117 EnclaveConnection (const std::string& name, Environment* enclave)
118118 : BaseDelayedConnection<T>(name, enclave, false , Duration::zero())
119- , log_{this ->fqn ()} {}
119+ , log_{this ->fqn ()}
120+ , logical_time_barrier_(enclave->scheduler ()) {}
120121
121122 inline auto upstream_set_callback () noexcept -> PortCallback override {
122123 return [this ](const BasePort& port) {
@@ -137,7 +138,7 @@ public:
137138 };
138139 }
139140
140- inline auto acquire_tag (const Tag& tag, std::unique_lock<std::mutex>& lock, std::condition_variable& cv,
141+ inline auto acquire_tag (const Tag& tag, std::unique_lock<std::mutex>& lock,
141142 const std::function<bool (void )>& abort_waiting) -> bool override {
142143 reactor_assert (lock.owns_lock ());
143144 log_.debug () << " downstream tries to acquire tag " << tag;
@@ -235,7 +236,7 @@ public:
235236 inline auto acquire_tag (const Tag& tag, std::unique_lock<std::mutex>& lock,
236237 const std::function<bool (void )>& abort_waiting) -> bool override {
237238 this ->log_ .debug () << " downstream tries to acquire tag " << tag;
238- return PhysicalTimeBarrier::acquire_tag (tag, lock, this ->environmet ()->scheduler (), abort_waiting);
239+ return PhysicalTimeBarrier::acquire_tag (tag, lock, this ->environment ()->scheduler (), abort_waiting);
239240 }
240241
241242 void bind_upstream_port (Port<T>* port) override { Connection<T>::bind_upstream_port (port); }
0 commit comments