23 lines
433 B
C
23 lines
433 B
C
#include <stdint.h>
|
|
#include "syscall.h"
|
|
#include "errors.h"
|
|
#include "dlmalloc/malloc.h"
|
|
#include "kprintf.h"
|
|
#include "proc/proc.h"
|
|
|
|
int32_t SYSCALL1(sys_debugprint, string) {
|
|
char *p = (char *)string;
|
|
kprintf("%s\n", p);
|
|
return E_OK;
|
|
}
|
|
|
|
int32_t SYSCALL0(sys_quitproc) {
|
|
proc_killself();
|
|
return E_OK;
|
|
}
|
|
|
|
SyscallFn SYSCALL_TABLE[SYSCALLS_MAX] = {
|
|
[SYS_DEBUGPRINT] = &sys_debugprint,
|
|
[SYS_QUITPROC] = &sys_quitproc,
|
|
};
|