-Changed most of the header guard strings to be a little more verbose
[newos.git] / include / kernel / kernel.h
blob4d241df7fb94ed6c78d2104c21946ac13ee1ba12
1 /*
2 ** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
4 */
5 #ifndef _KERNEL_H
6 #define _KERNEL_H
8 #include <kernel/ktypes.h>
9 #include <kernel/arch/kernel.h>
10 #include <sys/defines.h>
11 #include <sys/errors.h>
13 #define ROUNDUP(a, b) (((a) + ((b)-1)) & ~((b)-1))
14 #define ROUNDOWN(a, b) (((a) / (b)) * (b))
16 #define min(a, b) ((a) < (b) ? (a) : (b))
17 #define max(a, b) ((a) > (b) ? (a) : (b))
19 #define CHECK_BIT(a, b) ((a) & (1 << (b)))
20 #define SET_BIT(a, b) ((a) | (1 << (b)))
21 #define CLEAR_BIT(a, b) ((a) & (~(1 << (b))))
23 #define _PACKED __attribute__((packed))
25 #endif