summaryrefslogtreecommitdiff
path: root/na/include
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-04-21 23:12:44 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-04-21 23:12:44 +0800
commite7b6e9453800ecf15bee5f8f1763fd8c4862f70c (patch)
treecf5da81a7f5e4b8418df8eb0e50accc719eba598 /na/include
parent143a1392890a0c0bbcd79b5c77c71a75846fcc27 (diff)
downloadlume-e7b6e9453800ecf15bee5f8f1763fd8c4862f70c.tar.gz
lume-e7b6e9453800ecf15bee5f8f1763fd8c4862f70c.tar.xz
refactor: clean up errno and types headers for consistency and clarity
Diffstat (limited to 'na/include')
-rw-r--r--na/include/lume/errno.h9
-rw-r--r--na/include/lume/types.h11
2 files changed, 5 insertions, 15 deletions
diff --git a/na/include/lume/errno.h b/na/include/lume/errno.h
index e0786ce..2bcda9a 100644
--- a/na/include/lume/errno.h
+++ b/na/include/lume/errno.h
@@ -1,9 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2026 Richard Qin */
-/* from linux kernel linux/include/uapi/asm-generic/errno-base.h*/
+/* from linux kernel linux/include/uapi/asm-generic/errno-base.h */
-#ifndef _ASM_GENERIC_ERRNO_BASE_H
-#define _ASM_GENERIC_ERRNO_BASE_H
+#pragma once
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
@@ -38,6 +37,4 @@
#define EMLINK 31 /* Too many links */
#define EPIPE 32 /* Broken pipe */
#define EDOM 33 /* Math argument out of domain of func */
-#define ERANGE 34 /* Math result not representable */
-
-#endif \ No newline at end of file
+#define ERANGE 34 /* Math result not representable */ \ No newline at end of file
diff --git a/na/include/lume/types.h b/na/include/lume/types.h
index a8440f6..e296649 100644
--- a/na/include/lume/types.h
+++ b/na/include/lume/types.h
@@ -8,6 +8,8 @@
*
* All kernel code should use these types instead of
* stdint.h (which may not exist in freestanding mode).
+ *
+ * Kernel-wide configuration constants are in <lume/config.h>.
*/
using uint8 = unsigned char;
@@ -28,12 +30,3 @@ using uintptr = uint64;
#ifndef nullptr
/* C++11 and later have nullptr built-in */
#endif
-
-/* Max CPUs supported */
-inline constexpr int kMaxCPUs = 8;
-
-/* Page size */
-inline constexpr uint64 kPageSize = 4096;
-
-/* Kernel virtual address offset */
-inline constexpr uint64 kPageOffset = 0xFFFFFFC000000000ULL;