diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9e63754d34f1abebb92a921031ab4f90c3bd1f9a..2e52fd815873dc3301cb52fd6d0c068451c53581 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: "flowdalic/gentoo-dev:20240326.2100" +image: "flowdalic/gentoo-dev:20241115" before_script: - ulimit -a diff --git a/emper/Fiber.hpp b/emper/Fiber.hpp index 43bc010335855a4e7fbe7642834d903c30ebba9a..91b5d144cdbfd273efad8d1da9e9163e2718d165 100644 --- a/emper/Fiber.hpp +++ b/emper/Fiber.hpp @@ -58,14 +58,14 @@ class ALIGN_TO_CACHE_LINE Fiber : public AbstractFiber, public Logger<LogSubsyst protected: Fiber(fiber_fun_t function, void* arg, workeraffinity_t* affinity) - : function(std::move(function)), arg(arg), affinity(affinity){}; + : function(std::move(function)), arg(arg), affinity(affinity) {}; // cppcheck-suppress uninitMemberVar explicit Fiber(const fiber_fun0_t& function, workeraffinity_t* affinity) // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) : Fiber([function](UNUSED_ARG void* arg) { function(); }, nullptr, affinity) {} - Fiber(fiber_fun_t function, void* arg) : Fiber(std::move(function), arg, nullptr){}; + Fiber(fiber_fun_t function, void* arg) : Fiber(std::move(function), arg, nullptr) {}; // cppcheck-suppress uninitMemberVar explicit Fiber(const fiber_fun0_t& function) : Fiber(function, nullptr) {} diff --git a/emper/FiberHint.hpp b/emper/FiberHint.hpp index 4ac5fef4f0894790fd28da3c4a0687eb7c8be179..cde3534492bdcbf60ffe37d8cb65e6a16e992a41 100644 --- a/emper/FiberHint.hpp +++ b/emper/FiberHint.hpp @@ -33,7 +33,7 @@ class FiberHint { FiberHint(workerid_t workerId, emper::FiberSource source) : _tptr(static_cast<uintptr_t>(workerId), static_cast<uint16_t>(source)) {} - FiberHint(const FiberHint& other) : _tptr(other._tptr){}; + FiberHint(const FiberHint& other) : _tptr(other._tptr) {}; [[nodiscard]] auto getSource() const -> emper::FiberSource { return static_cast<emper::FiberSource>(_tptr.getTag()); diff --git a/emper/Semaphore.hpp b/emper/Semaphore.hpp index eb77a7f6c492f414b1b5875f3b7bd8282d80bc4e..0e06659487c05b53703f280204fd390566f921cd 100644 --- a/emper/Semaphore.hpp +++ b/emper/Semaphore.hpp @@ -17,8 +17,8 @@ class Semaphore { std::mutex mutex; public: - Semaphore() : Semaphore(0){}; - Semaphore(unsigned int count) : count(count){}; + Semaphore() : Semaphore(0) {}; + Semaphore(unsigned int count) : count(count) {}; auto acquire() -> bool { bool blocked; diff --git a/emper/SynchronizedFiber.hpp b/emper/SynchronizedFiber.hpp index 5d8b24e46e9a5921badc93e3119b48e57401d4ea..5b3577e606ca10e4b9635eb6b2279fa3242d975f 100644 --- a/emper/SynchronizedFiber.hpp +++ b/emper/SynchronizedFiber.hpp @@ -15,7 +15,7 @@ class SynchronizedFiber : public Fiber { SynchronizedFiber(fiber_fun_t function, void* arg, workeraffinity_t* affinity, PrivateSemaphore& semaphore) - : Fiber(std::move(function), arg, affinity), semaphore(semaphore){}; + : Fiber(std::move(function), arg, affinity), semaphore(semaphore) {}; // cppcheck-suppress uninitMemberVar explicit SynchronizedFiber(const fiber_fun0_t& function, workeraffinity_t* affinity, @@ -25,7 +25,7 @@ class SynchronizedFiber : public Fiber { semaphore) {} SynchronizedFiber(fiber_fun_t function, void* arg, PrivateSemaphore& semaphore) - : SynchronizedFiber(std::move(function), arg, nullptr, semaphore){}; + : SynchronizedFiber(std::move(function), arg, nullptr, semaphore) {}; // cppcheck-suppress uninitMemberVar explicit SynchronizedFiber(const fiber_fun0_t& function, PrivateSemaphore& semaphore) diff --git a/emper/io/Future.hpp b/emper/io/Future.hpp index c5a0b992e38fab2dec319b96529d94950c7df1f0..465ca5a1b0abda059c675375820192e3f19f2c11 100644 --- a/emper/io/Future.hpp +++ b/emper/io/Future.hpp @@ -235,10 +235,10 @@ class Future : public Logger<LogSubsystem::IO> { auto _wait() -> int32_t; Future(Operation op, int fd, void* buf, size_t len, off_t offset) - : sem(emper::BlockablePurpose::IO), op(op), fd(fd), buf(buf), len(len), offset(offset){}; + : sem(emper::BlockablePurpose::IO), op(op), fd(fd), buf(buf), len(len), offset(offset) {}; Future(Operation op, int fd, void* buf, size_t len, int flags) - : sem(emper::BlockablePurpose::IO), op(op), fd(fd), buf(buf), len(len), flags(flags){}; + : sem(emper::BlockablePurpose::IO), op(op), fd(fd), buf(buf), len(len), flags(flags) {}; public: // Clang-tidy warns about the exception possibly thrown by @@ -515,20 +515,22 @@ class PartialCompletableFuture : public Future { PartialCompletableFuture(Operation op, int fd, void* buf, size_t len, off_t offset, bool completeFully) : Future(op, fd, buf, len, offset), - partialCompletion(completeFully ? ENABLE_PARTIAL_COMPLETION : DISABLE_PARTIAL_COMPLETION){}; + partialCompletion(completeFully ? ENABLE_PARTIAL_COMPLETION : DISABLE_PARTIAL_COMPLETION) { + }; PartialCompletableFuture(Operation op, int fd, void* buf, size_t len, int flags, bool completeFully) : Future(op, fd, buf, len, flags), - partialCompletion(completeFully ? ENABLE_PARTIAL_COMPLETION : DISABLE_PARTIAL_COMPLETION){}; + partialCompletion(completeFully ? ENABLE_PARTIAL_COMPLETION : DISABLE_PARTIAL_COMPLETION) { + }; PartialCompletableFuture(Operation op, int fd, void* buf, size_t len, off_t offset, int32_t partialCompletion) - : Future(op, fd, buf, len, offset), partialCompletion(partialCompletion){}; + : Future(op, fd, buf, len, offset), partialCompletion(partialCompletion) {}; PartialCompletableFuture(Operation op, int fd, void* buf, size_t len, int flags, int32_t partialCompletion) - : Future(op, fd, buf, len, flags), partialCompletion(partialCompletion){}; + : Future(op, fd, buf, len, flags), partialCompletion(partialCompletion) {}; /** * Used for Stats::recordCompletion double dispatch @@ -642,11 +644,11 @@ class SendFuture : public PartialCompletableFuture { public: SendFuture(int socket, const void* buffer, size_t length, int flags, int32_t partialCompletion) : PartialCompletableFuture(Operation::SEND, socket, const_cast<void*>(buffer), length, flags, - partialCompletion){}; + partialCompletion) {}; SendFuture(int socket, const void* buffer, size_t length, int flags, bool send_all = true) : SendFuture(socket, const_cast<void*>(buffer), length, flags, - send_all ? ENABLE_PARTIAL_COMPLETION : DISABLE_PARTIAL_COMPLETION){}; + send_all ? ENABLE_PARTIAL_COMPLETION : DISABLE_PARTIAL_COMPLETION) {}; void submit() override; }; @@ -658,7 +660,7 @@ class RecvFuture : public Future { public: RecvFuture(int socket, void* buffer, size_t length, int flags) - : Future(Operation::RECV, socket, buffer, length, flags){}; + : Future(Operation::RECV, socket, buffer, length, flags) {}; void submit() override; }; @@ -670,7 +672,7 @@ class ConnectFuture : public Future { public: ConnectFuture(int socket, const struct sockaddr* address, socklen_t address_len) - : Future(Operation::CONNECT, socket, (void*)address, address_len, 0){}; + : Future(Operation::CONNECT, socket, (void*)address, address_len, 0) {}; }; class AcceptFuture : public Future { @@ -681,7 +683,7 @@ class AcceptFuture : public Future { public: AcceptFuture(int socket, const struct sockaddr* address, socklen_t* address_len) - : Future(Operation::ACCEPT, socket, (void*)address, (size_t)address_len, 0){}; + : Future(Operation::ACCEPT, socket, (void*)address, (size_t)address_len, 0) {}; }; class ReadFuture : public PartialCompletableFuture { @@ -698,7 +700,7 @@ class ReadFuture : public PartialCompletableFuture { ReadFuture(int fildes, void* buf, size_t nbyte, off_t offset, bool read_all = false) : PartialCompletableFuture( Operation::READ, fildes, buf, nbyte, offset, - read_all ? ENABLE_PARTIAL_COMPLETION : DISABLE_PARTIAL_COMPLETION){}; + read_all ? ENABLE_PARTIAL_COMPLETION : DISABLE_PARTIAL_COMPLETION) {}; }; class OpenatFuture : public Future { @@ -710,7 +712,7 @@ class OpenatFuture : public Future { public: OpenatFuture(int dirfd, const void* pathname, int flags, mode_t mode = 0) : Future(Operation::OPENAT, dirfd, const_cast<void*>(pathname), flags, - static_cast<off_t>(mode)){}; + static_cast<off_t>(mode)) {}; }; class WriteFuture : public PartialCompletableFuture { @@ -729,7 +731,7 @@ class WriteFuture : public PartialCompletableFuture { WriteFuture(int fildes, const void* buf, size_t nbyte, off_t offset, bool write_all = true) : PartialCompletableFuture( Operation::WRITE, fildes, const_cast<void*>(buf), nbyte, offset, - write_all ? ENABLE_PARTIAL_COMPLETION : DISABLE_PARTIAL_COMPLETION){}; + write_all ? ENABLE_PARTIAL_COMPLETION : DISABLE_PARTIAL_COMPLETION) {}; }; class WritevFuture : public Future { @@ -750,14 +752,14 @@ class WritevFuture : public Future { public: WritevFuture(int fildes, const struct iovec* iov, int iovnct) - : Future(Operation::WRITEV, fildes, (void*)iov, iovnct, 0){}; + : Future(Operation::WRITEV, fildes, (void*)iov, iovnct, 0) {}; }; class CloseFuture : public Future { void prepareSqeInternal(struct io_uring_sqe* sqe) override { io_uring_prep_close(sqe, fd); } public: - CloseFuture(int fildes) : Future(Operation::CLOSE, fildes, nullptr, 0, 0){}; + CloseFuture(int fildes) : Future(Operation::CLOSE, fildes, nullptr, 0, 0) {}; void submitAndForget() { Future::submitAndForget(); } }; @@ -768,7 +770,7 @@ class ShutdownFuture : public Future { } public: - ShutdownFuture(int sockfd, int how) : Future(Operation::SHUTDOWN, sockfd, nullptr, 0, how){}; + ShutdownFuture(int sockfd, int how) : Future(Operation::SHUTDOWN, sockfd, nullptr, 0, how) {}; }; /* @@ -815,7 +817,7 @@ class AlarmFuture : public Future { public: using Timespec = struct __kernel_timespec; - AlarmFuture(Timespec& ts) : Future(Operation::TIMEOUT, 0, (void*)&ts, 0, 0){}; + AlarmFuture(Timespec& ts) : Future(Operation::TIMEOUT, 0, (void*)&ts, 0, 0) {}; private: void prepareSqeInternal(struct io_uring_sqe* sqe) override { @@ -834,7 +836,7 @@ class CancelWrapper : public Future { void prepareSqeInternal(struct io_uring_sqe* sqe) override; public: - CancelWrapper(Future& future) : Future(Operation::CANCEL, 0, &future, 0, 0){}; + CancelWrapper(Future& future) : Future(Operation::CANCEL, 0, &future, 0, 0) {}; }; /* @@ -849,7 +851,7 @@ class MadviseFuture : public Future { public: MadviseFuture(void* addr, size_t len, int advise) - : Future(Operation::MADVISE, 0, addr, len, advise){}; + : Future(Operation::MADVISE, 0, addr, len, advise) {}; void submitAndForget() { Future::submitAndForget(); } }; diff --git a/emper/io/IoContext.hpp b/emper/io/IoContext.hpp index f124e2932ea20d39eca332ad2e0b38b7aa07e1bd..f96b3b8825839fdc9d06ebfba1993dc2cd080cd5 100644 --- a/emper/io/IoContext.hpp +++ b/emper/io/IoContext.hpp @@ -310,7 +310,8 @@ class IoContext : public Logger<LogSubsystem::IO> { public: IoContext(Runtime &runtime, size_t uring_entries, unsigned unboundedIowMax); IoContext(Runtime &runtime) - : IoContext(runtime, EMPER_IO_WORKER_URING_ENTRIES, IoContext::getDefaultUnboundedIowMax()){}; + : IoContext(runtime, EMPER_IO_WORKER_URING_ENTRIES, IoContext::getDefaultUnboundedIowMax()) { + }; ~IoContext(); /** diff --git a/emper/lib/math.hpp b/emper/lib/math.hpp index a2e8e95b109b7f6548aa41f5a1201a7f397e7468..9d7008195c2029e48355eedcee59b9377a3810c7 100644 --- a/emper/lib/math.hpp +++ b/emper/lib/math.hpp @@ -46,7 +46,7 @@ class RunningAverage { average_type average; public: - RunningAverage() : counter(0), average(0){}; + RunningAverage() : counter(0), average(0) {}; template <typename value_type> void update(value_type value) { diff --git a/emper/strategies/ws/WsDispatcher.hpp b/emper/strategies/ws/WsDispatcher.hpp index 134925f09cd6822b7a4f4fe9e980f18f91a8d7ba..0d8dc49f8a6f332469b5f4a487bfbbdd47ecac81 100644 --- a/emper/strategies/ws/WsDispatcher.hpp +++ b/emper/strategies/ws/WsDispatcher.hpp @@ -8,7 +8,7 @@ class Runtime; class WsDispatcher : public Dispatcher { public: - WsDispatcher(Runtime& runtime) : Dispatcher(runtime){}; + WsDispatcher(Runtime& runtime) : Dispatcher(runtime) {}; void dispatchLoop() override; }; diff --git a/eval/BFP9000.cpp b/eval/BFP9000.cpp index a8b125a402f2149a020d4089d65b6100161d8bc0..9ad6488cc84d39e28515f9cba610557f3c9cd86a 100644 --- a/eval/BFP9000.cpp +++ b/eval/BFP9000.cpp @@ -113,7 +113,7 @@ class Pulser { public: Pulser(std::uint_fast64_t seed) - : rng(seed), remaining_work_ns(work_duration_ns), remaining_sleep_ns(sleep_duration_ns){}; + : rng(seed), remaining_work_ns(work_duration_ns), remaining_sleep_ns(sleep_duration_ns) {}; void pulse() { std::binomial_distribution<std::uint64_t> work_dist(2 * pulse_target_work_ns, 0.5); diff --git a/tests/TellActorFromAnywhereTest.cpp b/tests/TellActorFromAnywhereTest.cpp index f9162d8bf0d78f24a27db7633a8ccf05298c257c..600c2257e7ec8b8f0ac073f73c8802e6cbb43eca 100644 --- a/tests/TellActorFromAnywhereTest.cpp +++ b/tests/TellActorFromAnywhereTest.cpp @@ -16,7 +16,7 @@ class SignallingActor : public Actor<unsigned int> { void receive(UNUSED_ARG unsigned int signalCount) override { bps.signal(); } public: - SignallingActor(BinaryPrivateSemaphore& bps) : bps(bps){}; + SignallingActor(BinaryPrivateSemaphore& bps) : bps(bps) {}; }; void emperTest() {