Skip to content
Snippets Groups Projects
Commit 62922234 authored by Florian Schmaus's avatar Florian Schmaus
Browse files

Fix debug-build specific #include statements

parent 7674eee5
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include <cassert> // for assert #include <cassert> // for assert
#include <cstdint> // for uintptr_t #include <cstdint> // for uintptr_t
#include <cstring> // for memset
#include <functional> // for function #include <functional> // for function
#include <iosfwd> // for ostream #include <iosfwd> // for ostream
#include <type_traits> // for remove_reference<>::type #include <type_traits> // for remove_reference<>::type
...@@ -13,6 +12,10 @@ ...@@ -13,6 +12,10 @@
#include "Common.hpp" // for func_t, DIE, ALIGN_TO_CACHE_LINE #include "Common.hpp" // for func_t, DIE, ALIGN_TO_CACHE_LINE
#include "Debug.hpp" // for LOGD, LogSubsystem, LogSubsystem::C, Logger #include "Debug.hpp" // for LOGD, LogSubsystem, LogSubsystem::C, Logger
#ifndef NDEBUG
#include <cstring> // for memset
#endif
extern "C" [[noreturn]] void switch_and_load_context(void** toTos); extern "C" [[noreturn]] void switch_and_load_context(void** toTos);
// *Not* marked as 'noreturn' because save_and_switch_context does // *Not* marked as 'noreturn' because save_and_switch_context does
// *actually return at some point, unlike the other switch_* // *actually return at some point, unlike the other switch_*
......
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
// Copyright © 2020 Florian Schmaus // Copyright © 2020 Florian Schmaus
#pragma once #pragma once
#include <map> // for allocator, map #include <iostream> // IWYU pragma: keep
#include <string> // for string, operator<< #include <map> // for allocator, map
#include <sstream> // IWYU pragma: keep
#include <string> // for string, operator<<
#ifdef NDEBUG #ifdef NDEBUG
...@@ -14,9 +16,6 @@ ...@@ -14,9 +16,6 @@
#else #else
#include <iostream> // IWYU pragma: keep
#include <sstream> // IWYU pragma: keep
// If we apply clang-format to the following region, then clang-format // If we apply clang-format to the following region, then clang-format
// will create multi-line macros. However clang-tidy's NOLINTNEXTLINE // will create multi-line macros. However clang-tidy's NOLINTNEXTLINE
// would then not work. :( // would then not work. :(
......
...@@ -3,7 +3,10 @@ ...@@ -3,7 +3,10 @@
#include "Fiber.hpp" #include "Fiber.hpp"
#include <iostream> // for operator<<, basic_ostream, ostream, basic_ostrea... #include <iostream> // for operator<<, basic_ostream, ostream, basic_ostrea...
#ifndef NDEBUG
#include <typeinfo> // for type_info #include <typeinfo> // for type_info
#endif
void Fiber::run() const { void Fiber::run() const {
LOGD("run() calling " << function.target<FIBER_FUN_TEMPLATE_ARG>() << " (" LOGD("run() calling " << function.target<FIBER_FUN_TEMPLATE_ARG>() << " ("
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include <atomic> // for atomic_uint, atomic, __atomic_base, memory... #include <atomic> // for atomic_uint, atomic, __atomic_base, memory...
#include <cassert> // for assert #include <cassert> // for assert
#include <climits> // for UINT_MAX
#include <functional> // for function #include <functional> // for function
#include <iosfwd> // for ostream #include <iosfwd> // for ostream
#include <new> // for operator new #include <new> // for operator new
...@@ -15,6 +14,10 @@ ...@@ -15,6 +14,10 @@
#include "Debug.hpp" // for LogSubsystem, LogSubsystem::F, Logger #include "Debug.hpp" // for LogSubsystem, LogSubsystem::F, Logger
#include "emper-common.h" // for workeraffinity_t, UNUSED_ARG #include "emper-common.h" // for workeraffinity_t, UNUSED_ARG
#ifndef NDEBUG
#include <climits> // for UINT_MAX
#endif
namespace adt { namespace adt {
template <typename T> template <typename T>
class MpscQueue; class MpscQueue;
......
...@@ -8,12 +8,9 @@ ...@@ -8,12 +8,9 @@
// Non portable. // Non portable.
#include <sched.h> // for cpu_set_t, CPU_SET, CPU_ZERO #include <sched.h> // for cpu_set_t, CPU_SET, CPU_ZERO
#include <sys/sysinfo.h> // for get_nprocs #include <sys/sysinfo.h> // for get_nprocs
#include <syscall.h> // for SYS_gettid
#include <unistd.h> // for syscall
#include <cstdlib> // for rand, srand, abort #include <cstdlib> // for rand, srand, abort
#include <memory> // for __shared_ptr_access, shared_ptr #include <memory> // for __shared_ptr_access, shared_ptr
#include <ostream> // for operator<<, basic_ostream<>:...
#include "Common.hpp" // for DIE_MSG_ERRNO, DIE, DIE_MSG #include "Common.hpp" // for DIE_MSG_ERRNO, DIE, DIE_MSG
#include "ContextManager.hpp" // for ContextManager #include "ContextManager.hpp" // for ContextManager
...@@ -24,6 +21,13 @@ ...@@ -24,6 +21,13 @@
#include "RuntimeStrategyStats.hpp" // for RuntimeStrategyStats #include "RuntimeStrategyStats.hpp" // for RuntimeStrategyStats
#include "strategies/ws/WsStrategy.hpp" // for WsStrategy, WsStrategy::INST... #include "strategies/ws/WsStrategy.hpp" // for WsStrategy, WsStrategy::INST...
#ifndef NDEBUG
#include <syscall.h> // for SYS_gettid
#include <unistd.h> // for syscall
#include <ostream> // for operator<<, basic_ostream<>:...
#endif
std::mutex Runtime::currentRuntimeMutex; std::mutex Runtime::currentRuntimeMutex;
Runtime* Runtime::currentRuntime; Runtime* Runtime::currentRuntime;
thread_local unsigned int Runtime::seed; thread_local unsigned int Runtime::seed;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment