summaryrefslogtreecommitdiff
path: root/kernel/kernel.h
blob: 0949b68fa0877d348093fbeea8fdb2a9d313e20d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/********************************************
 *  F00l 0S Central Configuration File      *
 ********************************************/

#include "log.h"

#ifndef FOOLOS_CONFIG_H
#define FOOLOS_CONFIG_H

#define BIN_INIT "/bin/init"
//#define FOOLOS_LOG_OFF
#define FOOLOS_LOG_COLOR true

#define FIFO_MAX_RINGBUFFERS 20
#define MAX_FIFOS 20
#define MAX_FD 20
#define MAX_TASKS 10
#define MEM_PRINT_MEMORYMAP

#define KMALLOC_MEM_SIZE  1024*1024*8  // 8MB for in kernel-memory
#define NUMBER_SPINLOCKS 16
#define SPINLOCK_LOG 0
#define SPINLOCK_ALLOC 1

#define S1(x) #x
#define S2(x) S1(x)

#define SMP_MAX_PROC 16 // 16 (together with bsp) We can currently only address a maximum of 16 cpus via ipis! 

// __FUNCTION__ ?
#ifndef FOOLOS_LOG_OFF
#define kpanic(...) {log(FOOLOS_LOG_COLOR,__FILE__,0," \033[41;37m [KERNEL PANIC] \033[37;40m " __VA_ARGS__ ); while(1);}
#define klog(...) log(FOOLOS_LOG_COLOR,__FILE__ ":" S2(__LINE__), 10,  __VA_ARGS__)
#define fixme(...) log(FOOLOS_LOG_COLOR,__FILE__ ":" S2(__LINE__) "[FIXME/TODO]:" , 10, __VA_ARGS__)
#endif

#ifdef FOOLOS_LOG_OFF
#define kpanic(...) {while(1);}
#define klog(...) {}
#define fixme(...) {}
#endif

#endif