add void to functions with no arguments
This commit is contained in:
parent
ca93f5077b
commit
581c2d7d64
8 changed files with 11 additions and 8 deletions
|
@ -173,7 +173,7 @@ static void isr31(struct interrupt_descriptor_32 *frame) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void exception_handlers_init() {
|
void exception_handlers_init(void) {
|
||||||
idt_register_handler(0, (size_t)isr0);
|
idt_register_handler(0, (size_t)isr0);
|
||||||
idt_register_handler(1, (size_t)isr1);
|
idt_register_handler(1, (size_t)isr1);
|
||||||
idt_register_handler(2, (size_t)isr2);
|
idt_register_handler(2, (size_t)isr2);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#ifndef _EXCEPTION_H
|
#ifndef _EXCEPTION_H
|
||||||
#define _EXCEPTION_H
|
#define _EXCEPTION_H
|
||||||
|
|
||||||
void exception_handlers_init();
|
void exception_handlers_init(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -6,7 +6,7 @@
|
||||||
struct interrupt_descriptor_32 idt[256];
|
struct interrupt_descriptor_32 idt[256];
|
||||||
static size_t idt_ptr[2];
|
static size_t idt_ptr[2];
|
||||||
|
|
||||||
void idt_init() {
|
void idt_init(void) {
|
||||||
size_t idt_address = (size_t)idt;
|
size_t idt_address = (size_t)idt;
|
||||||
idt_ptr[0] = (sizeof (struct interrupt_descriptor_32) * 256) + ((idt_address & 0xffff) << 16);
|
idt_ptr[0] = (sizeof (struct interrupt_descriptor_32) * 256) + ((idt_address & 0xffff) << 16);
|
||||||
idt_ptr[1] = idt_address >> 16;
|
idt_ptr[1] = idt_address >> 16;
|
||||||
|
|
|
@ -16,7 +16,7 @@ struct interrupt_descriptor_32 {
|
||||||
uint16_t offset_2; // offset bits 16..31
|
uint16_t offset_2; // offset bits 16..31
|
||||||
} __attribute__((__packed__));
|
} __attribute__((__packed__));
|
||||||
|
|
||||||
void idt_init();
|
void idt_init(void);
|
||||||
void idt_register_handler(uint8_t interrupt, size_t address);
|
void idt_register_handler(uint8_t interrupt, size_t address);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -58,7 +58,7 @@ end:
|
||||||
pic_send_eoi(1);
|
pic_send_eoi(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void keyboard_init() {
|
void keyboard_init(void) {
|
||||||
pic_irq_clear_mask(1);
|
pic_irq_clear_mask(1);
|
||||||
idt_register_handler(33, (size_t)irq);
|
idt_register_handler(33, (size_t)irq);
|
||||||
inb(0x60);
|
inb(0x60);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#ifndef _KEYBOARD_H
|
#ifndef _KEYBOARD_H
|
||||||
#define _KEYBOARD_H
|
#define _KEYBOARD_H
|
||||||
|
|
||||||
void keyboard_init();
|
void keyboard_init(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -118,7 +118,8 @@ void kputs(const char* data) {
|
||||||
kprintf("%s\n", data);
|
kprintf("%s\n", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void kabort() {
|
__attribute__((__noreturn__))
|
||||||
|
void kabort(void) {
|
||||||
kprintf("kabort(): halting kernel...\n");
|
kprintf("kabort(): halting kernel...\n");
|
||||||
asm volatile("cli");
|
asm volatile("cli");
|
||||||
asm volatile("hlt");
|
asm volatile("hlt");
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
int kputchar(int ic);
|
int kputchar(int ic);
|
||||||
int kprintf(const char* restrict format, ...);
|
int kprintf(const char* restrict format, ...);
|
||||||
void kputs(const char* data);
|
void kputs(const char* data);
|
||||||
void kabort();
|
|
||||||
|
__attribute__((__noreturn__))
|
||||||
|
void kabort(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in a new issue