diff --git a/headers/private/kernel/kernel.h b/headers/private/kernel/kernel.h index 7c056bd2d9..cd1932ae93 100644 --- a/headers/private/kernel/kernel.h +++ b/headers/private/kernel/kernel.h @@ -1,12 +1,17 @@ -/* -** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. -** Distributed under the terms of the NewOS License. -*/ +/* + * Copyright 2002-2004, Axel Dörfler, axeld@pinc-software.de. + * Distributed under the terms of the MIT License. + * + * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. + * Distributed under the terms of the NewOS License. + */ #ifndef _KERNEL_KERNEL_H #define _KERNEL_KERNEL_H #include +#include + /* Passed in buffers from user-space shouldn't point into the kernel */ #define IS_USER_ADDRESS(x) \ @@ -16,13 +21,17 @@ ((addr_t)(x) >= KERNEL_BASE && (addr_t)(x) <= KERNEL_TOP) /** Size of the kernel stack */ -#define KSTACK_SIZE (B_PAGE_SIZE * 2) +#ifndef DEBUG_KERNEL_STACKS +# define KERNEL_STACK_SIZE (B_PAGE_SIZE * 2) // 8 kB +#else +# define KERNEL_STACK_SIZE (B_PAGE_SIZE * 3) // 8 kB + one guard page +#endif +#define KERNEL_STACK_GUARD_PAGES 1 /** Size of the stack given to teams in user space */ -#define MAIN_THREAD_STACK_SIZE (16 * B_PAGE_SIZE) // 64 kB - // BeOS: (16 * 1024 * 1024) // 16 MB -#define STACK_SIZE (16 * B_PAGE_SIZE) - // BeOS: (256 * 1024) // 256 kB +#define USER_MAIN_THREAD_STACK_SIZE (16 * 1024 * 1024) // 16 MB +#define USER_STACK_SIZE (256 * 1024) // 256 kB +#define USER_STACK_GUARD_PAGES 4 // 16 kB /** Size of the environmental variables space for a process */ #define ENV_SIZE (B_PAGE_SIZE * 8)