forked from PoliEcho-holding-org/kern
Implemented a basic syscall handler
This commit is contained in:
@@ -17,7 +17,7 @@ typedef void (*isr_handler_ptr)(struct isr_int_frame* iframe);
|
||||
|
||||
int isr_init(void);
|
||||
void isr_register(uint8_t i, isr_handler_ptr handler);
|
||||
int isr_handle_interrupt(struct isr_int_frame iframe);
|
||||
void isr_handle_interrupt(struct isr_int_frame iframe);
|
||||
|
||||
// Assembly definitions (isr.s)
|
||||
extern void isr_return(void);
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
#ifndef _SYSCALL_H
|
||||
#define _SYSCALL_H
|
||||
|
||||
#include <kernel.h>
|
||||
#include <isr.h>
|
||||
|
||||
int syscall_handler(struct isr_int_frame* iframe) { (void)iframe; return 1; }
|
||||
#define SYSCALL_MAX 2
|
||||
#define SYS_EXIT 0
|
||||
#define SYS_TEST 1
|
||||
|
||||
int syscall_init(void);
|
||||
void syscall_register(size_t idx, void* handler);
|
||||
void syscall_handler(struct isr_int_frame* iframe);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user