feat: added support for waiting on an irq

This commit is contained in:
2021-02-27 15:52:10 +01:00
parent 934deb7984
commit 62ce1dfa77
8 changed files with 126 additions and 22 deletions

View File

@@ -12,11 +12,21 @@ void syscall1(uint32_t arg1) {
: "a"(arg1));
}
void syscall_yield_job() {
syscall1(SYSCALL_YIELD_JOB);
void syscall2(uint32_t arg1, uint32_t arg2) {
__asm__("int $0x80"
:
: "a"(arg1), "b"(arg2));
}
void noreturn syscall_start_scheduler() {
syscall1(SYSCALL_START_SCHEDULER);
while (1) { __asm__("hlt"); };
}
}
void syscall_yield_job() {
syscall1(SYSCALL_YIELD_JOB);
}
void syscall_yield_irq(uint16_t irq) {
syscall2(SYSCALL_YIELD_IRQ, irq );
}