summaryrefslogtreecommitdiff
path: root/syscalls/syscalls.c
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-08-18 20:04:32 +0200
committerMiguel <m.i@gmx.at>2018-08-18 20:04:32 +0200
commit857d82d45c2bbcaf5234b756736596b1e6a9d28a (patch)
treeaef00d48c5de7fb7cbbc278cd22a98c6a60e14d8 /syscalls/syscalls.c
parent18d1aa2593003680b0d6f59a36e5dad2821134b2 (diff)
cleaning up (Also for newlib)
Diffstat (limited to 'syscalls/syscalls.c')
-rw-r--r--syscalls/syscalls.c120
1 files changed, 0 insertions, 120 deletions
diff --git a/syscalls/syscalls.c b/syscalls/syscalls.c
deleted file mode 100644
index 3cd1f95..0000000
--- a/syscalls/syscalls.c
+++ /dev/null
@@ -1,120 +0,0 @@
-#include <stdint.h>
-
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include "fs.h"
-#include "syscalls.h"
-
-extern char **environ;
-
-int _readdir(const char *name,fs_dirent *dirs,int max)
-{
- return syscall(SYSCALL_READDIR,name,dirs,max);
-}
-
-int _poll(int file)
-{
- return syscall(SYSCALL_POLL,file,0,0);
-}
-
-void _exit(int ret)
-{
- return syscall(SYSCALL_EXIT,ret,environ,0);
-}
-
-int _close(int file)
-{
- return syscall(SYSCALL_CLOSE,file,0,0);
-}
-
-int _isatty(int file)
-{
- return syscall(SYSCALL_ISATTY,file,0,0);
-}
-
-int _lseek(int file, int ptr, int dir)
-{
- return syscall(SYSCALL_LSEEK,file,ptr,dir);
-}
-
-int _read(int file, char *ptr, int len)
-{
- return syscall(SYSCALL_READ,file,ptr,len);
-}
-
-int _open(const char *name, int flags, int mode)
-{
- return syscall(SYSCALL_OPEN,name,flags,mode);
-}
-
-int _write(int file, char *ptr, int len)
-{
- return syscall(SYSCALL_WRITE,file,ptr,len);
-}
-
-int _execve(char *name, char **argv, char **env)
-{
- return syscall(SYSCALL_EXECVE,name,argv,env);
-}
-
-uint32_t _sbrk(int incr)
-{
- return syscall(SYSCALL_SBRK,incr,0,0);
-}
-
-int _gettimeofday(struct timeval *tv, void *tz)
-{
- return syscall(SYSCALL_GETTIMEOFDAY,tv,tz,0);
-}
-
-int _fork(void)
-{
- return syscall(SYSCALL_FORK,0,0,0);
-}
-
-int _getpid(void)
-{
- return syscall(SYSCALL_GETPID,0,0,0);
-}
-
-int _kill(int pid, int sig)
-{
- return syscall(SYSCALL_KILL,pid,sig,0);
-}
-
-int _link(char *old, char *ne)
-{
- return syscall(SYSCALL_LINK,old,ne,0);
-}
-
-int _unlink(char *name)
-{
- return syscall(SYSCALL_UNLINK,name,0,0);
-}
-
-int _times(struct tms *buf)
-{
- return syscall(SYSCALL_TIMES,buf,0,0);
-}
-
-int _wait(int *status)
-{
- return syscall(SYSCALL_WAIT,status,0,0);
-}
-
-int _stat(const char *file, struct stat *st)
-{
- return syscall(SYSCALL_STAT,file,st,0);
-}
-
-int _lstat(const char *file, struct stat *st)
-{
- return syscall(SYSCALL_LSTAT,file,st,0);
-}
-
-int _fstat(int file, struct stat *st)
-{
- return syscall(SYSCALL_FSTAT,file,st,0);
-}