瀏覽代碼

增加对current.h的条件编译

fslongjin 2 年之前
父節點
當前提交
a296b79dbc
共有 2 個文件被更改,包括 10 次插入0 次删除
  1. 4 0
      kernel/process/preempt.h
  2. 6 0
      kernel/process/process.h

+ 4 - 0
kernel/process/preempt.h

@@ -1,6 +1,10 @@
 #pragma once
 
+#if ARCH(X86_64)
 #include <arch/x86_64/current.h>
+#else
+#error Unsupported architecture!
+#endif
 #include "proc-types.h"
 
 /**

+ 6 - 0
kernel/process/process.h

@@ -17,7 +17,13 @@
 #include <filesystem/VFS/VFS.h>
 #include <common/wait_queue.h>
 #include <mm/mm-types.h>
+
+#if ARCH(X86_64)
 #include <arch/x86_64/current.h>
+#else
+#error Unsupported architecture!
+#endif
+
 #include "proc-types.h"
 
 // 设置初始进程的PCB