Skip to content

Commit 7c5e89b

Browse files
committed
code fixes and clang format
1 parent 71c520b commit 7c5e89b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

include/reactor-cpp/connection.hh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "reactor.hh"
2121
#include "time.hh"
2222
#include "time_barrier.hh"
23-
#include <unistd.h>
2423

2524
namespace 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

116116
public:
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); }

lib/reaction.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ void Reaction::set_deadline_impl(Duration deadline, const std::function<void(voi
126126
}
127127

128128
void Reaction::set_index(unsigned index) {
129-
validate(this->environment()->phase() == Phase::Assembly,
130-
"Reaction indexes may only be set during assembly phase!");
129+
validate(this->environment()->phase() == Phase::Assembly, "Reaction indexes may only be set during assembly phase!");
131130
this->index_ = index;
132131
}
133132

0 commit comments

Comments
 (0)