My Kernel v0.1.0
syscalls.h
Go to the documentation of this file.
1
18#ifndef KERNEL_SYSCALLS_H
19#define KERNEL_SYSCALLS_H
20
21#if ARCH == I686
22#include <kernel/arch/i686/syscalls.h>
23#endif
24
25#include <kernel/types.h>
26
27#include <stddef.h>
28#include <sys/stat.h>
29
30typedef struct syscall_args {
31 u32 nr;
32 u32 arg1, arg2, arg3, arg4, arg5, arg6;
33} syscall_args_t;
34
35/* SYSCALLS HANDLER */
36
37void sys_exit(int status);
38pid_t sys_fork(void);
39int sys_read(int fd, char *, size_t len);
40int sys_write(int fd, const char *, size_t len);
41int sys_open(const char *, int oflags);
42int sys_close(int fd);
43off_t sys_lseek(int fd, off_t off, int whence);
44pid_t sys_getpid(void);
45int sys_stat(const char *path, struct stat *buf);
46int sys_lstat(const char *path, struct stat *buf);
47int sys_fstat(int fd, struct stat *buf);
48int sys_kill(pid_t, int signal);
49int sys_brk(void *);
50void *sys_sbrk(intptr_t);
51
52#endif /* KERNEL_SYSCALLS_H */