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 --- kernel/config.h | 2 +- kernel/syscalls.h | 38 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 3 deletions(-) (limited to 'kernel') diff --git a/kernel/config.h b/kernel/config.h index e48c63c..ef0fa71 100644 --- a/kernel/config.h +++ b/kernel/config.h @@ -6,7 +6,7 @@ //#define FOOLOS_COMPILE_FLOPPY // compile floppy drivers #define FOOLOS_CONSOLE_AUTOBREAK // add newline automatically at end of line -#define FOOLOS_LOG_OFF // do not log anything +//#define FOOLOS_LOG_OFF // do not log anything #define FOOLOS_CONSOLE // otherwise VESA will be used! #define MEM_PRINT_MEMORYMAP #define LOG_BUF_SIZE 4069 diff --git a/kernel/syscalls.h b/kernel/syscalls.h index eb9f854..6868033 100644 --- a/kernel/syscalls.h +++ b/kernel/syscalls.h @@ -1,3 +1,7 @@ +#include +#include +#include +#include #include "fs/fs.h" //fool-os syscalls @@ -15,7 +19,19 @@ #define SYSCALL_LSEEK 69 #define SYSCALL_SBRK 70 -int syscall_readdir(const char *name,fs_dirent *dirs,int max); +// stubs only so far! +#define SYSCALL_GETTIMEOFDAY 71 +#define SYSCALL_FORK 72 +#define SYSCALL_KILL 73 +#define SYSCALL_LINK 73 +#define SYSCALL_STAT 74 +#define SYSCALL_TIMES 75 +#define SYSCALL_UNLINK 76 +#define SYSCALL_WAIT 77 +#define SYSCALL_GETPID 78 + + +int syscall_readdir(const char *name,struct fs_dirent *dirs,int max); int syscall_exit(int ret, int none1, int none2); int syscall_open(char *name, int flags, int len); @@ -28,4 +44,22 @@ 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; +int syscall_gettimeofday(struct timeval *tv, struct timezone *tz); +int syscall_fork(void); +int syscall_getpid(void); +int syscall_kill(int pid, int sig); +int syscall_link(char *old, char *ne); +int syscall_stat(char *file, struct stat *st); +int syscall_times(struct tms *buf); +int syscall_unlink(char *name); +int syscall_wait(int *status); + + + + + + + + + + -- cgit v1.2.3