feat: dynamic boot medium probing and mounting
[lunaix-os.git] / lunaix-os / kernel / process / signal.c
index 9a9a34999dc86b19bf461b713c897b13357424c2..9933682a047e49c8c303370c7bbd571ed07c4472 100644 (file)
@@ -1,6 +1,3 @@
-#include <klibc/string.h>
-#include <lunaix/lunistd.h>
-#include <lunaix/lxsignal.h>
 #include <lunaix/process.h>
 #include <lunaix/sched.h>
 #include <lunaix/signal.h>
@@ -8,6 +5,8 @@
 #include <lunaix/status.h>
 #include <lunaix/syscall.h>
 
+#include <klibc/string.h>
+
 extern struct scheduler sched_ctx; /* kernel/sched.c */
 
 void __USER__
@@ -23,7 +22,6 @@ void* default_handlers[_SIG_NUM] = {
     [_SIGINT] = default_sighandler_term,
 };
 
-volatile struct proc_sigstate __temp_save;
 // Referenced in kernel/asm/x86/interrupt.S
 void*
 signal_dispatch()
@@ -80,6 +78,7 @@ signal_dispatch()
 
         解决办法就是先吧intr_ctx拷贝到一个静态分配的区域里,然后再注入到用户栈。
     */
+    static volatile struct proc_sigstate __temp_save;
     __temp_save.proc_regs = __current->intr_ctx;
     memcpy(__temp_save.fxstate, __current->fxstate, 512);