diff --git a/kernel/cpu/idt.c b/kernel/cpu/idt.c index 6ad5a21..affa8c7 100644 --- a/kernel/cpu/idt.c +++ b/kernel/cpu/idt.c @@ -73,7 +73,7 @@ static void exception_handler(struct frame state) { } stack_frame_t *stk; - stk = state.rbp; + stk = (stack_frame_t *)state.rbp; LOG("Трассировка стека:\n"); diff --git a/kernel/mod.c b/kernel/mod.c index 407e0eb..e4760f2 100644 --- a/kernel/mod.c +++ b/kernel/mod.c @@ -127,7 +127,7 @@ void mod_init( ) { continue; } - module_info_t (*module_init)(env_t * env) = + module_info_t (*module_init)(env_t *env) = (module_info_t(*)(env_t * env)) elf_entry((elf64_header_t *)module_ptr->address); // LOG("\t->Точка входа: 0x%x\n", module_init); @@ -136,7 +136,7 @@ void mod_init( ) { sys_install(&main_env); - uint64_t id = task_new_thread(1, module_list[i].name); + uint64_t id = task_new_thread((void *)1, module_list[i].name); module_info_t ret = module_init(&main_env); LOG("\t->%s\n", ret.message); diff --git a/modules/helloworld/main.c b/modules/helloworld/main.c index 469a2e6..8f37069 100644 --- a/modules/helloworld/main.c +++ b/modules/helloworld/main.c @@ -1,6 +1,6 @@ #include -static const char name[] = "Привет мир!"; +static const char name[] = "[APP]Привет мир!"; static const char message[] = "Привет из модуля!"; module_info_t __attribute__((section(".minit"))) init(env_t *env) { diff --git a/modules/ios/build.sh b/modules/ios/build.sh old mode 100644 new mode 100755 diff --git a/modules/ios/main.c b/modules/ios/main.c index 207a935..eafc091 100644 --- a/modules/ios/main.c +++ b/modules/ios/main.c @@ -36,6 +36,7 @@ static void main( ) { delete_thread( ); } else { app_list = realloc(app_list, app_count * sizeof(module_info_t)); + for (uint64_t i = 0; i < app_count; i++) { fb_printf("%2u.\t%s\n", app_list[i]); } for (;;) { asm volatile("hlt"); } } diff --git a/modules/ps2/main.c b/modules/ps2/main.c index aceccce..5863362 100644 --- a/modules/ps2/main.c +++ b/modules/ps2/main.c @@ -80,7 +80,7 @@ static int is_ctrl(uint8_t scancode) { } } -static void handler(struct frame *state) { +void handler(struct frame *state) { (void)state; while (!(inb(0x64) & 1)) { asm volatile("pause"); }