diff --git a/CMakeLists.txt b/CMakeLists.txt index a74bc9d..3565214 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -239,7 +239,6 @@ add_executable(load_tester tools/load_tester.cpp) target_link_libraries(load_tester Threads::Threads llhttp_static perfetto) add_test(NAME arena_allocator_tests COMMAND test_arena_allocator) -add_test(NAME connection_registry_tests COMMAND test_connection_registry) add_test(NAME commit_request_tests COMMAND test_commit_request) add_test(NAME http_handler_tests COMMAND test_http_handler) add_test(NAME server_connection_return_tests diff --git a/src/ThreadPipeline.h b/src/ThreadPipeline.h index 155654a..4d74390 100644 --- a/src/ThreadPipeline.h +++ b/src/ThreadPipeline.h @@ -48,7 +48,7 @@ template struct ThreadPipeline { // Constructor // lgSlotCount: log2 of ring buffer size (e.g., 10 -> 1024 slots) // threadsPerStage: number of threads for each stage (e.g., {1, 4, 2} = 1 - // producer, 4 stage-1 workers, 2 stage-2 workers) + // stage-0 worker, 4 stage-1 workers, 2 stage-2 workers) ThreadPipeline(int lgSlotCount, const std::vector &threadsPerStage) : slotCount(1 << lgSlotCount), slotCountMask(slotCount - 1), threadState(threadsPerStage.size()), ring(slotCount) { @@ -228,9 +228,9 @@ private: return safeLen; } - struct alignas(128) ThreadState { + struct ThreadState { // Where this thread has published up to - std::atomic pops{0}; + alignas(128) std::atomic pops{0}; // Where this thread will publish to the next time it publishes uint32_t localPops{0}; // Where the previous stage's threads have published up to last we checked diff --git a/src/connection.cpp b/src/connection.cpp index ae88416..2b96f33 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -5,8 +5,6 @@ #include #include -// TODO fix up this whole thing - Connection::Connection(struct sockaddr_storage addr, int fd, int64_t id, size_t epoll_index, ConnectionHandler *handler, Server &server)