Added a comment why debugging kernel stacks doesn't work like one would expect.

Added prototype for new shutdown() function.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10041 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-11-19 20:13:58 +00:00
parent 787b9abf8a
commit 7b380c5b9f

View File

@ -20,6 +20,12 @@
#define IS_KERNEL_ADDRESS(x) \ #define IS_KERNEL_ADDRESS(x) \
((addr_t)(x) >= KERNEL_BASE && (addr_t)(x) <= KERNEL_TOP) ((addr_t)(x) >= KERNEL_BASE && (addr_t)(x) <= KERNEL_TOP)
//#define DEBUG_KERNEL_STACKS
// Note, debugging kernel stacks doesn't really work yet. Since the
// interrupt will also try to use the stack on a page fault, all
// you get is a reboot.
// At least, you then know that the stack overflows in this case :)
/** Size of the kernel stack */ /** Size of the kernel stack */
#ifndef DEBUG_KERNEL_STACKS #ifndef DEBUG_KERNEL_STACKS
# define KERNEL_STACK_SIZE (B_PAGE_SIZE * 2) // 8 kB # define KERNEL_STACK_SIZE (B_PAGE_SIZE * 2) // 8 kB
@ -45,5 +51,9 @@
#define SET_BIT(a, b) ((a) | (1 << (b))) #define SET_BIT(a, b) ((a) | (1 << (b)))
#define CLEAR_BIT(a, b) ((a) & (~(1 << (b)))) #define CLEAR_BIT(a, b) ((a) & (~(1 << (b))))
#ifdef __cplusplus
extern "C"
#endif
status_t shutdown(bool reboot);
#endif /* _KERNEL_KERNEL_H */ #endif /* _KERNEL_KERNEL_H */