summaryrefslogtreecommitdiff
path: root/kernel/syscalls.h
blob: eb9f854a8335fa074bf2186594bf1038927c4eb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "fs/fs.h"

//fool-os syscalls
#define SYSCALL_READDIR 63

//syscalls required by newlib
#define SYSCALL_EXIT 60
#define SYSCALL_WRITE 61
#define SYSCALL_READ 62
#define SYSCALL_EXECVE 64
#define SYSCALL_OPEN 65
#define SYSCALL_CLOSE 66
#define SYSCALL_FSTAT 67
#define SYSCALL_ISATTY 68
#define SYSCALL_LSEEK 69
#define SYSCALL_SBRK 70

int syscall_readdir(const char *name,fs_dirent *dirs,int max);

int syscall_exit(int ret, int none1, int none2);
int syscall_open(char *name, int flags, int len);
int syscall_write(int file, char *buf, int len);
int syscall_read(int file, char *buf, int len);
int syscall_execve(char *name, char **argv, char **env);
int syscall_close(int file,int none1,int none2);
int syscall_fstat(int file, struct stat *st,int none);
int syscall_isatty(int file,int none1,int none2);  
int syscall_lseek(int file,int ptr,int dir); 
int syscall_sbrk(int incr, int none1, int none2);

//fork, getpid, kill, link, stat, times, unlink, wait;