diff options
| author | Miguel <m.i@gmx.at> | 2018-08-17 17:51:51 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-08-17 17:51:51 +0200 |
| commit | 51d4dd040a291b62c648ff6cc0d7e0058cf4056f (patch) | |
| tree | 142b7db302ba038dba526f99e5854cfc87b5f92e /kernel/usermode.c | |
| parent | 006214f8c63189500b6ca55e0ef8f97eb35d47f5 (diff) | |
starting implicit function calls cleanup
Diffstat (limited to 'kernel/usermode.c')
| -rw-r--r-- | kernel/usermode.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/usermode.c b/kernel/usermode.c index f0618d7..eb19cdf 100644 --- a/kernel/usermode.c +++ b/kernel/usermode.c @@ -7,6 +7,7 @@ tss_struct sys_tss; //Define the TSS as a global structure // generic syscall interface! +/* int syscall(int call, int p1, int p2, int p3) { int ebx; // will hold return value; @@ -31,16 +32,20 @@ int syscall(int call, int p1, int p2, int p3) return ebx; } +*/ +/* 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); } +*/ void install_tss(int cpu_no){ @@ -65,6 +70,6 @@ char *env_init[]={"var1=dupa","var2=mundl",NULL}; // THIS WILL BE RUN IN RING 3! void userfunc() { - execve("/bin/init",argv_init,env_init); + syscall(SYSCALL_EXECVE,"/bin/init",argv_init,env_init); while(1); // we should never get here. } |
