Move top-level headers to src/cpuinfo directory
diff --git a/src/api.c b/src/api.c
index 0504a63..98b5805 100644
--- a/src/api.c
+++ b/src/api.c
@@ -1,8 +1,8 @@
#include <stddef.h>
#include <cpuinfo.h>
-#include <api.h>
-#include <log.h>
+#include <cpuinfo/internal-api.h>
+#include <cpuinfo/log.h>
bool cpuinfo_is_initialized = false;
diff --git a/src/arm/android/properties.c b/src/arm/android/properties.c
index 42dca9d..6e69647 100644
--- a/src/arm/android/properties.c
+++ b/src/arm/android/properties.c
@@ -9,7 +9,7 @@
#include <linux/api.h>
#include <arm/android/api.h>
#include <arm/linux/api.h>
-#include <log.h>
+#include <cpuinfo/log.h>
#if CPUINFO_MOCK
#include <cpuinfo-mock.h>
diff --git a/src/arm/cache.c b/src/arm/cache.c
index fc1914c..c972a2d 100644
--- a/src/arm/cache.c
+++ b/src/arm/cache.c
@@ -1,7 +1,7 @@
#include <stdint.h>
#include <cpuinfo.h>
-#include <log.h>
+#include <cpuinfo/log.h>
#include <arm/api.h>
#include <arm/midr.h>
diff --git a/src/arm/linux/aarch32-isa.c b/src/arm/linux/aarch32-isa.c
index 74f9ace..1a6d8a4 100644
--- a/src/arm/linux/aarch32-isa.c
+++ b/src/arm/linux/aarch32-isa.c
@@ -6,7 +6,7 @@
#include <arm/linux/api.h>
#include <arm/linux/cp.h>
#include <arm/midr.h>
-#include <log.h>
+#include <cpuinfo/log.h>
#if CPUINFO_MOCK
diff --git a/src/arm/linux/aarch64-isa.c b/src/arm/linux/aarch64-isa.c
index 783b8e8..697a047 100644
--- a/src/arm/linux/aarch64-isa.c
+++ b/src/arm/linux/aarch64-isa.c
@@ -1,7 +1,7 @@
#include <stdint.h>
#include <arm/linux/api.h>
-#include <log.h>
+#include <cpuinfo/log.h>
void cpuinfo_arm64_linux_decode_isa_from_proc_cpuinfo(
diff --git a/src/arm/linux/chipset.c b/src/arm/linux/chipset.c
index ed19fb0..fa2bcd8 100644
--- a/src/arm/linux/chipset.c
+++ b/src/arm/linux/chipset.c
@@ -7,7 +7,7 @@
#ifdef __ANDROID__
#include <arm/android/api.h>
#endif
-#include <log.h>
+#include <cpuinfo/log.h>
#define CPUINFO_COUNT_OF(x) (sizeof(x) / sizeof(0[x]))
diff --git a/src/arm/linux/clusters.c b/src/arm/linux/clusters.c
index e3dcb79..d36c2df 100644
--- a/src/arm/linux/clusters.c
+++ b/src/arm/linux/clusters.c
@@ -11,8 +11,8 @@
#include <arm/api.h>
#include <arm/midr.h>
#include <linux/api.h>
-#include <api.h>
-#include <log.h>
+#include <cpuinfo/internal-api.h>
+#include <cpuinfo/log.h>
static inline bool bitmask_all(uint32_t bitfield, uint32_t mask) {
return (bitfield & mask) == mask;
diff --git a/src/arm/linux/cpuinfo.c b/src/arm/linux/cpuinfo.c
index 3873749..e9bdd4b 100644
--- a/src/arm/linux/cpuinfo.c
+++ b/src/arm/linux/cpuinfo.c
@@ -7,7 +7,7 @@
#include <linux/api.h>
#include <arm/linux/api.h>
#include <arm/midr.h>
-#include <log.h>
+#include <cpuinfo/log.h>
/*
* Size, in chars, of the on-stack buffer used for parsing lines of /proc/cpuinfo.
diff --git a/src/arm/linux/hwcap.c b/src/arm/linux/hwcap.c
index adf454e..36d0d91 100644
--- a/src/arm/linux/hwcap.c
+++ b/src/arm/linux/hwcap.c
@@ -13,7 +13,7 @@
#endif
#include <cpuinfo.h>
#include <arm/linux/api.h>
-#include <log.h>
+#include <cpuinfo/log.h>
#if CPUINFO_ARCH_ARM64 || CPUINFO_ARCH_ARM && !defined(__ANDROID__)
#include <sys/auxv.h>
diff --git a/src/arm/linux/init.c b/src/arm/linux/init.c
index 95b78fb..262bb55 100644
--- a/src/arm/linux/init.c
+++ b/src/arm/linux/init.c
@@ -11,8 +11,8 @@
#include <arm/api.h>
#include <arm/midr.h>
#include <linux/api.h>
-#include <api.h>
-#include <log.h>
+#include <cpuinfo/internal-api.h>
+#include <cpuinfo/log.h>
struct cpuinfo_arm_isa cpuinfo_isa = { 0 };
diff --git a/src/arm/linux/midr.c b/src/arm/linux/midr.c
index db4e40f..8616df1 100644
--- a/src/arm/linux/midr.c
+++ b/src/arm/linux/midr.c
@@ -11,8 +11,8 @@
#include <arm/api.h>
#include <arm/midr.h>
#include <linux/api.h>
-#include <api.h>
-#include <log.h>
+#include <cpuinfo/internal-api.h>
+#include <cpuinfo/log.h>
#define CPUINFO_COUNT_OF(x) (sizeof(x) / sizeof(0[x]))
diff --git a/src/arm/mach/init.c b/src/arm/mach/init.c
index e5b43cd..64a0b37 100644
--- a/src/arm/mach/init.c
+++ b/src/arm/mach/init.c
@@ -11,8 +11,8 @@
#include <cpuinfo.h>
#include <mach/api.h>
-#include <api.h>
-#include <log.h>
+#include <cpuinfo/internal-api.h>
+#include <cpuinfo/log.h>
struct cpuinfo_arm_isa cpuinfo_isa = {
diff --git a/src/arm/uarch.c b/src/arm/uarch.c
index 1dcf048..6257a17 100644
--- a/src/arm/uarch.c
+++ b/src/arm/uarch.c
@@ -2,7 +2,7 @@
#include <arm/api.h>
#include <arm/midr.h>
-#include <log.h>
+#include <cpuinfo/log.h>
void cpuinfo_arm_decode_vendor_uarch(
diff --git a/src/api.h b/src/cpuinfo/internal-api.h
similarity index 100%
rename from src/api.h
rename to src/cpuinfo/internal-api.h
diff --git a/src/log.h b/src/cpuinfo/log.h
similarity index 100%
rename from src/log.h
rename to src/cpuinfo/log.h
diff --git a/src/utils.h b/src/cpuinfo/utils.h
similarity index 100%
rename from src/utils.h
rename to src/cpuinfo/utils.h
diff --git a/src/init.c b/src/init.c
index 2a30fcf..fa69807 100644
--- a/src/init.c
+++ b/src/init.c
@@ -5,8 +5,8 @@
#endif
#include <cpuinfo.h>
-#include <api.h>
-#include <log.h>
+#include <cpuinfo/internal-api.h>
+#include <cpuinfo/log.h>
#ifdef __APPLE__
#include "TargetConditionals.h"
diff --git a/src/linux/cpulist.c b/src/linux/cpulist.c
index fe383dd..2871986 100644
--- a/src/linux/cpulist.c
+++ b/src/linux/cpulist.c
@@ -14,7 +14,7 @@
#include <cpuinfo-mock.h>
#endif
#include <linux/api.h>
-#include <log.h>
+#include <cpuinfo/log.h>
/*
diff --git a/src/linux/current.c b/src/linux/current.c
index 1fcd7de..472a4c9 100644
--- a/src/linux/current.c
+++ b/src/linux/current.c
@@ -7,8 +7,8 @@
#include <sched.h>
#include <cpuinfo.h>
-#include <api.h>
-#include <log.h>
+#include <cpuinfo/internal-api.h>
+#include <cpuinfo/log.h>
#include <linux/api.h>
diff --git a/src/linux/mockfile.c b/src/linux/mockfile.c
index 0b75798..3fdd6bf 100644
--- a/src/linux/mockfile.c
+++ b/src/linux/mockfile.c
@@ -18,7 +18,7 @@
#include <cpuinfo-mock.h>
#include <arm/linux/api.h>
#include <arm/midr.h>
-#include <log.h>
+#include <cpuinfo/log.h>
static struct cpuinfo_mock_file* cpuinfo_mock_files = NULL;
diff --git a/src/linux/multiline.c b/src/linux/multiline.c
index 9a07b6e..1feeb9b 100644
--- a/src/linux/multiline.c
+++ b/src/linux/multiline.c
@@ -14,7 +14,7 @@
#include <cpuinfo-mock.h>
#endif
#include <linux/api.h>
-#include <log.h>
+#include <cpuinfo/log.h>
bool cpuinfo_linux_parse_multiline_file(const char* filename, size_t buffer_size, cpuinfo_line_callback callback, void* context)
diff --git a/src/linux/processors.c b/src/linux/processors.c
index 8df06f5..b2cc68b 100644
--- a/src/linux/processors.c
+++ b/src/linux/processors.c
@@ -13,7 +13,7 @@
#endif
#include <linux/api.h>
-#include <log.h>
+#include <cpuinfo/log.h>
#define STRINGIFY(token) #token
diff --git a/src/linux/smallfile.c b/src/linux/smallfile.c
index 977852c..98cde00 100644
--- a/src/linux/smallfile.c
+++ b/src/linux/smallfile.c
@@ -14,7 +14,7 @@
#include <cpuinfo-mock.h>
#endif
#include <linux/api.h>
-#include <log.h>
+#include <cpuinfo/log.h>
bool cpuinfo_linux_parse_small_file(const char* filename, size_t buffer_size, cpuinfo_smallfile_callback callback, void* context) {
diff --git a/src/mach/topology.c b/src/mach/topology.c
index 6fd2409..61868c4 100644
--- a/src/mach/topology.c
+++ b/src/mach/topology.c
@@ -5,7 +5,7 @@
#include <sys/types.h>
#include <sys/sysctl.h>
-#include <log.h>
+#include <cpuinfo/log.h>
#include <mach/api.h>
diff --git a/src/x86/cache/deterministic.c b/src/x86/cache/deterministic.c
index 2cd5827..befd502 100644
--- a/src/x86/cache/deterministic.c
+++ b/src/x86/cache/deterministic.c
@@ -2,8 +2,8 @@
#include <cpuinfo.h>
#include <x86/cpuid.h>
-#include <utils.h>
-#include <log.h>
+#include <cpuinfo/utils.h>
+#include <cpuinfo/log.h>
enum cache_type {
diff --git a/src/x86/cache/init.c b/src/x86/cache/init.c
index b2af08d..d581016 100644
--- a/src/x86/cache/init.c
+++ b/src/x86/cache/init.c
@@ -1,8 +1,8 @@
#include <stdint.h>
#include <cpuinfo.h>
-#include <utils.h>
-#include <log.h>
+#include <cpuinfo/utils.h>
+#include <cpuinfo/log.h>
#include <x86/cpuid.h>
#include <x86/api.h>
diff --git a/src/x86/init.c b/src/x86/init.c
index 37f988d..1c65485 100644
--- a/src/x86/init.c
+++ b/src/x86/init.c
@@ -4,8 +4,8 @@
#include <cpuinfo.h>
#include <x86/cpuid.h>
#include <x86/api.h>
-#include <utils.h>
-#include <log.h>
+#include <cpuinfo/utils.h>
+#include <cpuinfo/log.h>
struct cpuinfo_x86_isa cpuinfo_isa = { 0 };
diff --git a/src/x86/linux/cpuinfo.c b/src/x86/linux/cpuinfo.c
index 5042cb0..79255f2 100644
--- a/src/x86/linux/cpuinfo.c
+++ b/src/x86/linux/cpuinfo.c
@@ -6,7 +6,7 @@
#include <linux/api.h>
#include <x86/linux/api.h>
-#include <log.h>
+#include <cpuinfo/log.h>
/*
* Size, in chars, of the on-stack buffer used for parsing lines of /proc/cpuinfo.
diff --git a/src/x86/linux/init.c b/src/x86/linux/init.c
index 8e20448..0c80d55 100644
--- a/src/x86/linux/init.c
+++ b/src/x86/linux/init.c
@@ -7,8 +7,8 @@
#include <x86/api.h>
#include <x86/linux/api.h>
#include <linux/api.h>
-#include <api.h>
-#include <log.h>
+#include <cpuinfo/internal-api.h>
+#include <cpuinfo/log.h>
static inline uint32_t bit_mask(uint32_t bits) {
diff --git a/src/x86/mach/init.c b/src/x86/mach/init.c
index a5371a5..7b41ad0 100644
--- a/src/x86/mach/init.c
+++ b/src/x86/mach/init.c
@@ -5,8 +5,8 @@
#include <cpuinfo.h>
#include <x86/api.h>
#include <mach/api.h>
-#include <api.h>
-#include <log.h>
+#include <cpuinfo/internal-api.h>
+#include <cpuinfo/log.h>
static inline uint32_t max(uint32_t a, uint32_t b) {
diff --git a/src/x86/topology.c b/src/x86/topology.c
index 0b0e23e..0e83d46 100644
--- a/src/x86/topology.c
+++ b/src/x86/topology.c
@@ -2,8 +2,8 @@
#include <stdbool.h>
#include <cpuinfo.h>
-#include <utils.h>
-#include <log.h>
+#include <cpuinfo/utils.h>
+#include <cpuinfo/log.h>
#include <x86/api.h>
#include <x86/cpuid.h>
diff --git a/src/x86/windows/init.c b/src/x86/windows/init.c
index d65aa6c..eb3498a 100644
--- a/src/x86/windows/init.c
+++ b/src/x86/windows/init.c
@@ -5,8 +5,8 @@
#include <cpuinfo.h>
#include <x86/api.h>
-#include <api.h>
-#include <log.h>
+#include <cpuinfo/internal-api.h>
+#include <cpuinfo/log.h>
#include <Windows.h>