summaryrefslogtreecommitdiff
path: root/na/kernel/pid.cc
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-07-10 11:24:56 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-07-10 11:24:56 +0800
commit1767d390fbf3d0c65389de46caf0b6d43ef3b6ad (patch)
tree0f5e01cd7c7a05abb6b1c7472d7f00f49caf02cc /na/kernel/pid.cc
parent63dc025705f6533b91fb1a7d26e6ed864efd9900 (diff)
downloadlume-1767d390fbf3d0c65389de46caf0b6d43ef3b6ad.tar.gz
lume-1767d390fbf3d0c65389de46caf0b6d43ef3b6ad.tar.xz
feat: establish bootable new architecture checkpoint
Replace the compressed boot path with a relocatable higher-half RISC-V entry, expand memory and SMP support, and add the driver, TTY, VFS, exec, signal, syscall, initramfs, and self-test infrastructure needed for a bootable kernel checkpoint.
Diffstat (limited to 'na/kernel/pid.cc')
-rw-r--r--na/kernel/pid.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/na/kernel/pid.cc b/na/kernel/pid.cc
index 81b9494..04b846b 100644
--- a/na/kernel/pid.cc
+++ b/na/kernel/pid.cc
@@ -12,8 +12,10 @@ void PidAllocator::init()
{
for (int i = 0; i < kBitmapWords; i++)
bitmap_[i] = 0;
- next_hint_ = 2;
- bitmap_[0] |= 0x3ULL; /* Reserve PID 0 (idle) and 1 (init) */
+ next_hint_ = 1;
+ bitmap_[0] |= 0x1ULL; /* Reserve PID 0 (idle/swapper) only.
+ * PID 1 (init) is allocated normally — the first
+ * kthread_create() call gets it, matching Linux. */
}
int32 PidAllocator::alloc()