Ajla 0.1.0
[ajla.git] / ajla.c
blob7c497a30a587fd22aad3a2c2714820092f1b87c3
1 /*
2 * Copyright (C) 2024 Mikulas Patocka
4 * This file is part of Ajla.
6 * Ajla is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, either version 3 of the License, or (at your option) any later
9 * version.
11 * Ajla is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along with
16 * Ajla. If not, see <https://www.gnu.org/licenses/>.
19 #include "ajla.h"
21 #include "args.h"
22 #include "amalloc.h"
23 #include "mem_al.h"
24 #include "obj_reg.h"
25 #include "os.h"
26 #include "asm.h"
27 #include "mpint.h"
28 #include "thread.h"
29 #include "addrlock.h"
30 #include "type.h"
31 #include "data.h"
32 #include "arindex.h"
33 #include "funct.h"
34 #include "pcode.h"
35 #include "profile.h"
36 #include "builtin.h"
37 #include "save.h"
38 #include "module.h"
39 #include "tick.h"
40 #include "timer.h"
41 #include "iomux.h"
42 #include "resolver.h"
43 #include "task.h"
45 extern_const bool dll = false;
46 int retval = 0;
48 int main(int argc, const char * const argv[])
50 error_init();
51 args_init(argc, argv);
52 amalloc_init();
53 mem_init();
54 obj_registry_init();
55 os_init();
56 asm_init();
57 mpint_init();
58 thread_init();
59 error_init_multithreaded();
60 mem_init_multithreaded();
61 obj_registry_init_multithreaded();
62 address_lock_init();
63 os_init_multithreaded();
64 amalloc_init_multithreaded();
65 type_init();
66 data_init();
67 array_index_init();
68 function_init();
69 pcode_init();
70 profile_init();
71 builtin_init();
72 ipio_init();
73 save_init();
74 module_init();
75 ipret_init();
76 tick_init();
77 timer_init();
78 iomux_init();
79 resolver_init();
80 task_init();
82 bist();
84 program_run();
86 task_run();
88 task_done();
89 resolver_done();
90 iomux_done();
91 timer_done();
92 tick_done();
93 ipret_done();
94 module_done();
95 save_done();
96 ipio_done();
97 builtin_done();
98 profile_done();
99 pcode_done();
100 function_done();
101 array_index_done();
102 data_done();
103 type_done();
104 amalloc_done_multithreaded();
105 os_done_multithreaded();
106 address_lock_done();
107 obj_registry_done_multithreaded();
108 mem_done_multithreaded();
109 error_done_multithreaded();
110 thread_done();
111 mpint_done();
112 asm_done();
113 os_done();
114 obj_registry_done();
115 mem_done();
116 amalloc_done();
117 args_done();
118 error_done();
120 return retval;