AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1#ifndef _CONFIG_H
2#define _CONFIG_H
3
4/*
5 * The kernel's build-time settings that C code needs: uname()'s strings,
6 * and a few limits. (Which parts are built is the build configuration's,
7 * configs/, and reaches C as CONFIG_* macros.) The architecture's own
8 * config.h completes this one.
9 */
10
11/* Turns a macro's value into a string. */
12#define __CONFIG_STR(x) #x
13#define __CONFIG_XSTR(x) __CONFIG_STR(x)
14
15/* The compiler the kernel was built with. __GNUC__ is tested last,
16 * because other compilers define it too, to say they are compatible. */
17#if defined(__clang__)
18 /* clang's __VERSION__ is a whole description, not just the version */
19 #define __CONFIG_COMPILER__ "clang"
20 #define __CONFIG_COMPILER_VERSION__ __CONFIG_XSTR(__clang_major__) "." \
21 __CONFIG_XSTR(__clang_minor__) "." \
22 __CONFIG_XSTR(__clang_patchlevel__)
23#elif defined(__PCC__)
24 #define __CONFIG_COMPILER__ "pcc"
25 #define __CONFIG_COMPILER_VERSION__ __VERSION__
26#elif defined(__TINYC__)
27 #define __CONFIG_COMPILER__ "tcc"
28 #define __CONFIG_COMPILER_VERSION__ "0.9.27"
29#elif defined(__GNUC__)
30 #define __CONFIG_COMPILER__ "gcc"
31 #define __CONFIG_COMPILER_VERSION__ __VERSION__
32#else
33 #define __CONFIG_COMPILER__ "unknown"
34 #define __CONFIG_COMPILER_VERSION__ "?"
35#endif
36
37#define UTSNAME_SYSNAME "AquilaOS"
38#define UTSNAME_RELEASE "v0.0.2"
39#define UTSNAME_NODENAME "aquila"
40/* when the kernel was built, and with what compiler */
41#define UTSNAME_VERSION __DATE__ " " __TIME__ " " __CONFIG_COMPILER__ " " __CONFIG_COMPILER_VERSION__
42
43#define __CONFIG_TIMESTAMP__ __DATE__ " " __TIME__
44
45/* The most file descriptors a process can have open. */
46#define FDS_COUNT 64
47
48/* The size of a process's user stack. */
49#define USER_STACK_SIZE (8192 * 1024U)
50
51#endif /* ! _CONFIG_H */