refactor: Optimize the signal context overhead
[lunaix-os.git] / lunaix-os / includes / lunaix / common.h
index c9ef9e4671dda33d2307dd0ca40005e07a819b6f..ac0b4d4eac8d504de5c96619e9edc77a7ec8c273 100644 (file)
@@ -13,6 +13,7 @@
 #define KSTACK_SIZE MEM_1MB
 #define KSTACK_START (USER_START - KSTACK_SIZE)
 #define KSTACK_TOP ((USER_START - 1) & ~0xf)
+#define within_kstack(addr) (KSTACK_START <= (addr) && (addr) <= KSTACK_TOP)
 
 #define KERNEL_MM_BASE 0xC0000000