-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkernel.c
52 lines (44 loc) · 810 Bytes
/
kernel.c
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
44
45
46
47
48
49
50
51
52
// Copyright (c) 2019 Hongzheng Chen
// chenhzh37@mail2.sysu.edu.cn
// Ubuntu 18.04 + gcc 7.3.0
/****** kernel.c ******/
#include "hal.h"
#include "task.h"
#include "semaphore.h"
#include "fat12.h"
#include "sysfile.h"
#include "terminal.h"
void initialize()
{
/*
* Hardware Abstraction Layer (HAL) initialization
*/
hal_initialize();
/*
* Process initialization
*/
proc_init();
put_info("Initialized process");
/*
* Semaphore initialization
*/
sem_init();
put_info("Initialized semaphore");
/*
* File system (FAT12) initialization
*/
fat12_init();
put_info("Initialized fat12");
/*
* Virtual file system (VFS) initialization
*/
file_init();
put_info("Initialized VFS");
enable();
}
void main () {
initialize();
clear_screen();
terminal_init();
terminal_loop();
}