axle OS
x86_32 UNIX-like hobby OS
sysfuncs.h
1 #ifndef SYSFUNCS_H
2 #define SYSFUNCS_H
3 
4 #include "syscall.h"
5 #include <kernel/util/multitasking/tasks/task.h>
6 #include <kernel/util/vfs/fs.h>
7 
8 //installs common syscalls into syscall table
9 void create_sysfuncs();
10 
11 /*
12 //Standard terminal driver puts
13 DECL_SYSCALL2(output, int, char*);
14 
15 //Standard terminal driver putc
16 DECL_SYSCALL1(terminal_putchar, char);
17 
18 //Yeilds current process's running state to a different process
19 //Typically invoked if process is blocked by I/O, or sleeping
20 DECL_SYSCALL1(yield, task_state);
21 
22 //Standard read syscall
23 //reads at most count characters into buf using file descriptor fd
24 DECL_SYSCALL3(read, int, void*, size_t);
25 */
26 
27 DECL_SYSCALL0(kill);
28 DECL_SYSCALL3(exec, char* , char**, char**);
29 DECL_SYSCALL2(fopen, const char* , int);
30 DECL_SYSCALL3(read, int , char* , size_t);
31 DECL_SYSCALL2(output, int , char*);
32 DECL_SYSCALL1(yield, task_state);
33 DECL_SYSCALL5(mmap, void* , int, int, int, int);
34 DECL_SYSCALL2(munmap, void* , int);
35 DECL_SYSCALL1(sbrk, int);
36 DECL_SYSCALL3(lseek, int , int, int);
37 DECL_SYSCALL3(write, int , char*, int);
38 DECL_SYSCALL0(fork);
39 DECL_SYSCALL0(getpid);
40 DECL_SYSCALL3(waitpid, int , int*, int);
41 
42 #endif