Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion SilKit/source/services/orchestration/LifecycleService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ class LifecycleService
std::atomic<bool> _timeSyncActive{false};

// Final State Handling
std::mutex _finalStatePromiseMutex;
std::unique_ptr<std::promise<ParticipantState>> _finalStatePromise;

std::future<ParticipantState> _finalStateFuture;
Expand Down
1 change: 0 additions & 1 deletion SilKit/source/services/orchestration/TimeSyncService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ class TimeSyncService
WatchDog _watchDog;
bool _isCoupledToWallClock{false};
std::thread _wallClockCouplingThread;
mutable std::mutex _mx;
std::atomic<std::chrono::nanoseconds::rep> _currentWallClockSyncPointNs{0};
double _animationFactor{0};
std::atomic<bool> _wallClockCouplingThreadRunning{false};
Expand Down
6 changes: 5 additions & 1 deletion SilKit/source/tracing/PcapSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ void PcapSink::Open(SinkType outputType, const std::string& outputPath)
throw SilKitError("PcapSink::Open: outputPath must not be empty!");
}

std::unique_lock<decltype(_lock)> lock{_lock};

switch (outputType)
{
case SilKit::SinkType::PcapFile:
Expand Down Expand Up @@ -73,6 +75,8 @@ auto PcapSink::Name() const -> const std::string&

void PcapSink::Close()
{
std::unique_lock<decltype(_lock)> lock{_lock};

if (_file)
{
_file.flush();
Expand Down Expand Up @@ -107,7 +111,7 @@ void PcapSink::Trace(SilKit::Services::TransmitDirection /*unused*/,
}
const auto& message = traceMessage.Get<Services::Ethernet::EthernetFrame>();

std::unique_lock<decltype(_lock)> lock;
std::unique_lock<decltype(_lock)> lock{_lock};

const auto tosec = 1000'000ull;
const auto usec = std::chrono::duration_cast<std::chrono::microseconds>(timestamp);
Expand Down
Loading