From 6e8ea08166b53507f38ed7f435728b7470a061ab Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Fri, 21 Nov 2014 15:21:07 +0100 Subject: trying to port binutils --- userspace/syscalls.c | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) (limited to 'userspace/syscalls.c') diff --git a/userspace/syscalls.c b/userspace/syscalls.c index 8c8bfc9..51436fb 100644 --- a/userspace/syscalls.c +++ b/userspace/syscalls.c @@ -1,6 +1,3 @@ -#include -#include -#include #include "../kernel/syscalls.h" /* @@ -93,4 +90,47 @@ 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 stat(const char *file, struct stat *st) +{ + return syscall(SYSCALL_STAT,file,st,0); +} + +int times(struct tms *buf) +{ + return syscall(SYSCALL_TIMES,buf,0,0); +} + +int unlink(char *name) +{ + return syscall(SYSCALL_UNLINK,name,0,0); +} + +int wait(int *status) +{ + return syscall(SYSCALL_WAIT,status,0,0); +} -- cgit v1.2.3