aboutsummaryrefslogtreecommitdiffhomepage
path: root/absl/base/internal
diff options
context:
space:
mode:
Diffstat (limited to 'absl/base/internal')
-rw-r--r--absl/base/internal/atomic_hook.h2
-rw-r--r--absl/base/internal/endian_test.cc2
-rw-r--r--absl/base/internal/low_level_alloc.cc10
-rw-r--r--absl/base/internal/low_level_alloc.h2
-rw-r--r--absl/base/internal/low_level_alloc_test.cc2
-rw-r--r--absl/base/internal/low_level_scheduling.h2
-rw-r--r--absl/base/internal/malloc_extension.cc3
-rw-r--r--absl/base/internal/malloc_extension.h7
-rw-r--r--absl/base/internal/malloc_hook.cc7
-rw-r--r--absl/base/internal/raw_logging.cc9
-rw-r--r--absl/base/internal/raw_logging.h1
-rw-r--r--absl/base/internal/spinlock.cc2
-rw-r--r--absl/base/internal/spinlock.h6
-rw-r--r--absl/base/internal/spinlock_wait.h1
-rw-r--r--absl/base/internal/sysinfo.cc1
-rw-r--r--absl/base/internal/thread_identity_test.cc1
-rw-r--r--absl/base/internal/unscaledcycleclock.h1
17 files changed, 36 insertions, 23 deletions
diff --git a/absl/base/internal/atomic_hook.h b/absl/base/internal/atomic_hook.h
index 8eee367..1f9a810 100644
--- a/absl/base/internal/atomic_hook.h
+++ b/absl/base/internal/atomic_hook.h
@@ -16,8 +16,8 @@
#ifndef ABSL_BASE_INTERNAL_ATOMIC_HOOK_H_
#define ABSL_BASE_INTERNAL_ATOMIC_HOOK_H_
-#include <cassert>
#include <atomic>
+#include <cassert>
#include <utility>
namespace absl {
diff --git a/absl/base/internal/endian_test.cc b/absl/base/internal/endian_test.cc
index 6812214..f3ff4b3 100644
--- a/absl/base/internal/endian_test.cc
+++ b/absl/base/internal/endian_test.cc
@@ -16,13 +16,11 @@
#include <algorithm>
#include <cstdint>
-#include <cstdio>
#include <limits>
#include <random>
#include <vector>
#include "gtest/gtest.h"
-#include "absl/base/casts.h"
#include "absl/base/config.h"
namespace absl {
diff --git a/absl/base/internal/low_level_alloc.cc b/absl/base/internal/low_level_alloc.cc
index c55201b..08f89ea 100644
--- a/absl/base/internal/low_level_alloc.cc
+++ b/absl/base/internal/low_level_alloc.cc
@@ -17,17 +17,19 @@
// This allocator is slow and wasteful of memory;
// it should not be used when performance is key.
-#include "absl/base/config.h"
-
#include "absl/base/internal/low_level_alloc.h"
+#include "absl/base/config.h"
+#include "absl/base/internal/scheduling_mode.h"
+#include "absl/base/macros.h"
+#include "absl/base/thread_annotations.h"
+
// LowLevelAlloc requires that the platform support low-level
// allocation of virtual memory. Platforms lacking this cannot use
// LowLevelAlloc.
#ifndef ABSL_LOW_LEVEL_ALLOC_MISSING
#ifndef _WIN32
-#include <pthread.h>
#include <signal.h>
#include <sys/mman.h>
#include <unistd.h>
@@ -38,8 +40,8 @@
#include <string.h>
#include <algorithm>
#include <atomic>
-#include <cstddef>
#include <cerrno>
+#include <cstddef>
#include <new> // for placement-new
#include "absl/base/dynamic_annotations.h"
diff --git a/absl/base/internal/low_level_alloc.h b/absl/base/internal/low_level_alloc.h
index d6eb813..f3e8aa5 100644
--- a/absl/base/internal/low_level_alloc.h
+++ b/absl/base/internal/low_level_alloc.h
@@ -24,8 +24,10 @@
// IWYU pragma: private, include "base/low_level_alloc.h"
+#include <sys/types.h>
#include <cstdint>
+#include "absl/base/attributes.h"
#include "absl/base/config.h"
// LowLevelAlloc requires that the platform support low-level
diff --git a/absl/base/internal/low_level_alloc_test.cc b/absl/base/internal/low_level_alloc_test.cc
index 5f60c3d..2935760 100644
--- a/absl/base/internal/low_level_alloc_test.cc
+++ b/absl/base/internal/low_level_alloc_test.cc
@@ -14,10 +14,12 @@
#include "absl/base/internal/low_level_alloc.h"
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <thread> // NOLINT(build/c++11)
#include <unordered_map>
+#include <utility>
#include "absl/base/internal/malloc_hook.h"
diff --git a/absl/base/internal/low_level_scheduling.h b/absl/base/internal/low_level_scheduling.h
index b950107..a01d1c0 100644
--- a/absl/base/internal/low_level_scheduling.h
+++ b/absl/base/internal/low_level_scheduling.h
@@ -30,8 +30,8 @@ extern "C" void __google_enable_rescheduling(bool disable_result);
namespace absl {
namespace base_internal {
-class SpinLock; // To allow use of SchedulingGuard.
class SchedulingHelper; // To allow use of SchedulingGuard.
+class SpinLock; // To allow use of SchedulingGuard.
// SchedulingGuard
// Provides guard semantics that may be used to disable cooperative rescheduling
diff --git a/absl/base/internal/malloc_extension.cc b/absl/base/internal/malloc_extension.cc
index daf4bc3..3da981c 100644
--- a/absl/base/internal/malloc_extension.cc
+++ b/absl/base/internal/malloc_extension.cc
@@ -15,15 +15,12 @@
#include "absl/base/internal/malloc_extension.h"
#include <assert.h>
-#include <stdint.h>
-#include <stdio.h>
#include <string.h>
#include <atomic>
#include <string>
#include "absl/base/dynamic_annotations.h"
#include "absl/base/internal/malloc_extension_c.h"
-#include "absl/base/port.h"
namespace absl {
namespace base_internal {
diff --git a/absl/base/internal/malloc_extension.h b/absl/base/internal/malloc_extension.h
index dee4116..46b767f 100644
--- a/absl/base/internal/malloc_extension.h
+++ b/absl/base/internal/malloc_extension.h
@@ -25,14 +25,15 @@
#ifndef ABSL_BASE_INTERNAL_MALLOC_EXTENSION_H_
#define ABSL_BASE_INTERNAL_MALLOC_EXTENSION_H_
+#include <stddef.h>
+#include <stdint.h>
#include <atomic>
#include <map>
#include <memory>
+#include <string>
#include <vector>
-#include <stddef.h>
-#include <stdint.h>
-#include <string>
+#include "absl/base/attributes.h"
#include "absl/base/macros.h"
#include "absl/base/port.h"
namespace absl {
diff --git a/absl/base/internal/malloc_hook.cc b/absl/base/internal/malloc_hook.cc
index d5d227a..4f5a0be 100644
--- a/absl/base/internal/malloc_hook.cc
+++ b/absl/base/internal/malloc_hook.cc
@@ -23,16 +23,17 @@
#undef mremap
#endif
+#include "absl/base/internal/malloc_hook.h"
+
+#include <algorithm>
#include <cstddef>
#include <cstdint>
-#include <algorithm>
#include "absl/base/call_once.h"
-#include "absl/base/casts.h"
-#include "absl/base/internal/malloc_hook.h"
#include "absl/base/internal/malloc_hook_invoke.h"
#include "absl/base/internal/raw_logging.h"
#include "absl/base/internal/spinlock.h"
+#include "absl/base/macros.h"
// __THROW is defined in glibc systems. It means, counter-intuitively,
// "This function will never throw an exception." It's an optional
diff --git a/absl/base/internal/raw_logging.cc b/absl/base/internal/raw_logging.cc
index d197d44..c089061 100644
--- a/absl/base/internal/raw_logging.cc
+++ b/absl/base/internal/raw_logging.cc
@@ -12,8 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <atomic>
-#include <cassert>
+#include "absl/base/internal/raw_logging.h"
+
+#include <stddef.h>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
@@ -22,8 +23,6 @@
#include "absl/base/config.h"
#include "absl/base/internal/atomic_hook.h"
#include "absl/base/internal/log_severity.h"
-#include "absl/base/internal/raw_logging.h"
-#include "absl/base/port.h"
// We know how to perform low-level writes to stderr in POSIX and Windows. For
// these platforms, we define the token ABSL_LOW_LEVEL_WRITE_SUPPORTED.
@@ -38,6 +37,7 @@
#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || \
defined(__GENCLAVE__)
#include <unistd.h>
+
#define ABSL_HAVE_POSIX_WRITE 1
#define ABSL_LOW_LEVEL_WRITE_SUPPORTED 1
#else
@@ -57,6 +57,7 @@
#ifdef _WIN32
#include <io.h>
+
#define ABSL_HAVE_RAW_IO 1
#define ABSL_LOW_LEVEL_WRITE_SUPPORTED 1
#else
diff --git a/absl/base/internal/raw_logging.h b/absl/base/internal/raw_logging.h
index 47cf437..568d2af 100644
--- a/absl/base/internal/raw_logging.h
+++ b/absl/base/internal/raw_logging.h
@@ -19,6 +19,7 @@
#ifndef ABSL_BASE_INTERNAL_RAW_LOGGING_H_
#define ABSL_BASE_INTERNAL_RAW_LOGGING_H_
+#include "absl/base/attributes.h"
#include "absl/base/internal/log_severity.h"
#include "absl/base/macros.h"
#include "absl/base/port.h"
diff --git a/absl/base/internal/spinlock.cc b/absl/base/internal/spinlock.cc
index 6257bfc..517668d 100644
--- a/absl/base/internal/spinlock.cc
+++ b/absl/base/internal/spinlock.cc
@@ -16,8 +16,8 @@
#include <algorithm>
#include <atomic>
+#include <limits>
-#include "absl/base/casts.h"
#include "absl/base/internal/atomic_hook.h"
#include "absl/base/internal/cycleclock.h"
#include "absl/base/internal/spinlock_wait.h"
diff --git a/absl/base/internal/spinlock.h b/absl/base/internal/spinlock.h
index fa64ba6..1f50d74 100644
--- a/absl/base/internal/spinlock.h
+++ b/absl/base/internal/spinlock.h
@@ -30,11 +30,17 @@
#ifndef ABSL_BASE_INTERNAL_SPINLOCK_H_
#define ABSL_BASE_INTERNAL_SPINLOCK_H_
+#include <stdint.h>
+#include <sys/types.h>
#include <atomic>
+#include "absl/base/attributes.h"
#include "absl/base/dynamic_annotations.h"
#include "absl/base/internal/low_level_scheduling.h"
+#include "absl/base/internal/raw_logging.h"
+#include "absl/base/internal/scheduling_mode.h"
#include "absl/base/internal/tsan_mutex_interface.h"
+#include "absl/base/macros.h"
#include "absl/base/port.h"
#include "absl/base/thread_annotations.h"
diff --git a/absl/base/internal/spinlock_wait.h b/absl/base/internal/spinlock_wait.h
index 5432c1c..6734cc9 100644
--- a/absl/base/internal/spinlock_wait.h
+++ b/absl/base/internal/spinlock_wait.h
@@ -22,6 +22,7 @@
// places listing in //base:spinlock_wait_users. If you need to use it outside
// of //base, please request permission to be added to that list.
+#include <stdint.h>
#include <atomic>
#include "absl/base/internal/scheduling_mode.h"
diff --git a/absl/base/internal/sysinfo.cc b/absl/base/internal/sysinfo.cc
index 11863ea..6a4c006 100644
--- a/absl/base/internal/sysinfo.cc
+++ b/absl/base/internal/sysinfo.cc
@@ -48,7 +48,6 @@
#include "absl/base/internal/raw_logging.h"
#include "absl/base/internal/spinlock.h"
#include "absl/base/internal/unscaledcycleclock.h"
-#include "absl/base/thread_annotations.h"
namespace absl {
namespace base_internal {
diff --git a/absl/base/internal/thread_identity_test.cc b/absl/base/internal/thread_identity_test.cc
index a2b053d..7695a09 100644
--- a/absl/base/internal/thread_identity_test.cc
+++ b/absl/base/internal/thread_identity_test.cc
@@ -19,6 +19,7 @@
#include "gtest/gtest.h"
#include "absl/base/internal/spinlock.h"
+#include "absl/base/macros.h"
#include "absl/synchronization/internal/per_thread_sem.h"
#include "absl/synchronization/mutex.h"
diff --git a/absl/base/internal/unscaledcycleclock.h b/absl/base/internal/unscaledcycleclock.h
index ddf6a5e..049f1ca 100644
--- a/absl/base/internal/unscaledcycleclock.h
+++ b/absl/base/internal/unscaledcycleclock.h
@@ -91,6 +91,7 @@ class UnscaledCycleClockWrapperForGetCurrentTime;
namespace base_internal {
class CycleClock;
class UnscaledCycleClockWrapperForInitializeFrequency;
+
class UnscaledCycleClock {
private:
UnscaledCycleClock() = delete;