Make syscalls accept their interrupt frame, remove useless intr_eoi() param
This commit is contained in:
@ -11,9 +11,7 @@ int32_t SYSCALL0(sys_schedrelease) {
|
||||
Proc *proc = PROCS.current;
|
||||
spinlock_release(&PROCS.spinlock);
|
||||
|
||||
if (INTR_CURRENT_FRAME != NULL) {
|
||||
proc_sched((void *)INTR_CURRENT_FRAME);
|
||||
}
|
||||
proc_sched((void *)frame);
|
||||
|
||||
return E_OK;
|
||||
}
|
||||
|
@ -3,11 +3,13 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include "compiler/attr.h"
|
||||
#include "hal/hal.h"
|
||||
|
||||
#define SYSCALLS_MAX 0xff
|
||||
|
||||
#define SYSCALL0(name) \
|
||||
name(UNUSED uint64_t _1, \
|
||||
name(IntrStackFrame *frame, \
|
||||
UNUSED uint64_t _1, \
|
||||
UNUSED uint64_t _2, \
|
||||
UNUSED uint64_t _3, \
|
||||
UNUSED uint64_t _4, \
|
||||
@ -16,7 +18,8 @@
|
||||
)
|
||||
|
||||
#define SYSCALL1(name, arg1) \
|
||||
name(uint64_t arg1, \
|
||||
name(IntrStackFrame *frame, \
|
||||
uint64_t arg1, \
|
||||
UNUSED uint64_t _2, \
|
||||
UNUSED uint64_t _3, \
|
||||
UNUSED uint64_t _4, \
|
||||
@ -25,7 +28,8 @@
|
||||
)
|
||||
|
||||
#define SYSCALL2(name, arg1, arg2) \
|
||||
name(uint64_t arg1, \
|
||||
name(IntrStackFrame *frame, \
|
||||
uint64_t arg1, \
|
||||
uint64_t arg2, \
|
||||
UNUSED uint64_t _3, \
|
||||
UNUSED uint64_t _4, \
|
||||
@ -34,7 +38,8 @@
|
||||
)
|
||||
|
||||
#define SYSCALL3(name, arg1, arg2, arg3) \
|
||||
name(uint64_t arg1, \
|
||||
name(IntrStackFrame *frame, \
|
||||
uint64_t arg1, \
|
||||
uint64_t arg2, \
|
||||
uint64_t arg3, \
|
||||
UNUSED uint64_t _4, \
|
||||
@ -43,7 +48,8 @@
|
||||
)
|
||||
|
||||
#define SYSCALL4(name, arg1, arg2, arg3, arg4) \
|
||||
name(uint64_t arg1, \
|
||||
name(IntrStackFrame *frame, \
|
||||
uint64_t arg1, \
|
||||
uint64_t arg2, \
|
||||
uint64_t arg3, \
|
||||
uint64_t arg4, \
|
||||
@ -52,7 +58,8 @@
|
||||
)
|
||||
|
||||
#define SYSCALL5(name, arg1, arg2, arg3, arg4, arg5) \
|
||||
name(uint64_t arg1, \
|
||||
name(IntrStackFrame *frame, \
|
||||
uint64_t arg1, \
|
||||
uint64_t arg2, \
|
||||
uint64_t arg3, \
|
||||
uint64_t arg4, \
|
||||
@ -61,7 +68,8 @@
|
||||
)
|
||||
|
||||
#define SYSCALL6(name, arg1, arg2, arg3, arg4, arg5, arg6) \
|
||||
name(uint64_t arg1, \
|
||||
name(IntrStackFrame *frame, \
|
||||
uint64_t arg1, \
|
||||
uint64_t arg2, \
|
||||
uint64_t arg3, \
|
||||
uint64_t arg4, \
|
||||
@ -69,7 +77,7 @@
|
||||
uint64_t arg6 \
|
||||
)
|
||||
|
||||
typedef int32_t (*SyscallFn)(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t);
|
||||
typedef int32_t (*SyscallFn)(IntrStackFrame *, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t);
|
||||
|
||||
extern SyscallFn SYSCALL_TABLE[SYSCALLS_MAX];
|
||||
|
||||
|
Reference in New Issue
Block a user