summaryrefslogtreecommitdiff
path: root/userspace/syscalls.c
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-11-20 20:24:18 +0100
committerMichal Idziorek <m.i@gmx.at>2014-11-20 20:24:18 +0100
commit1a6da07e9a6ef7661a58cb6ce22b2874370d6c0d (patch)
tree9d13767cfce0fc0c9f78aed42385533673065e98 /userspace/syscalls.c
parent1acde03a7c0f85aca9919e374e3df6cee6f0bd08 (diff)
experimenting wih userspace and syscalls
Diffstat (limited to 'userspace/syscalls.c')
-rw-r--r--userspace/syscalls.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/userspace/syscalls.c b/userspace/syscalls.c
index 7471418..fd9b5ba 100644
--- a/userspace/syscalls.c
+++ b/userspace/syscalls.c
@@ -4,14 +4,15 @@
#include "../kernel/syscalls.h"
/*
-char *__env1[]={0};
-char *__env2[]={"dupa","test"};
-char **environ={__env1,__env2};
+char *__env3[]={0};
+char *__env1[]={"a=10","b=20"};
+char *__env2[]={"dupa=test2"};
+char **environ={__env1,__env2,__env3};
*/
void _exit(int ret)
{
-while(1);
+ while(1);
}
// generic syscall interface!
@@ -87,14 +88,8 @@ int execve(char *name, char **argv, char **env)
return syscall(SYSCALL_EXECVE,name,argv,env);
}
-
-caddr_t sbrk(int incr)
+uint32_t sbrk(int incr)
{
- static int alloc=0x300000; // TODO: implement properly sbrk!!!
- int oldalloc=alloc;
- alloc+=incr;
- return oldalloc;
-
return syscall(SYSCALL_SBRK,incr,0,0);
}