summaryrefslogtreecommitdiff
path: root/src/user/lib
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-18 16:16:07 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-18 16:16:07 +0200
commit7e6454020ed1143e05e83a683606f318995458e5 (patch)
tree763ec6f5dda5f8f662f5eeb38f29d4279681b0a2 /src/user/lib
parentdaa6c2450fa0646619698f0dc01b0456b2541317 (diff)
downloadTCE-7e6454020ed1143e05e83a683606f318995458e5.tar.gz
TCE-7e6454020ed1143e05e83a683606f318995458e5.zip
Can now spawn new processes.
Diffstat (limited to 'src/user/lib')
-rw-r--r--src/user/lib/include/tce/syscall.h3
-rw-r--r--src/user/lib/tce/syscall.c10
2 files changed, 13 insertions, 0 deletions
diff --git a/src/user/lib/include/tce/syscall.h b/src/user/lib/include/tce/syscall.h
index 028b544..1811422 100644
--- a/src/user/lib/include/tce/syscall.h
+++ b/src/user/lib/include/tce/syscall.h
@@ -19,6 +19,9 @@ int proc_priv();
void* sbrk(size_t size);
void brk(void* ptr);
+int run(char* file, char** args);
+int waitpid(int pid);
+
FILE open(char* filename, int mode);
FILE open_relative(FILE root, char* filename, int mode);
int stat(char* filename, file_info *info);
diff --git a/src/user/lib/tce/syscall.c b/src/user/lib/tce/syscall.c
index 3e8d75e..bc8bfd8 100644
--- a/src/user/lib/tce/syscall.c
+++ b/src/user/lib/tce/syscall.c
@@ -73,6 +73,16 @@ void brk(void* ptr) {
return call (SC_BRK, ptr, 0, 0, 0, 0);
}
+// ********** proc
+
+int run(char* filename, char** args) {
+ return call(SC_RUN, (unsigned)filename, (unsigned)args, 0, 0, 0);
+}
+
+int waitpid(int p) {
+ return call(SC_WAITPID, p, 0, 0, 0, 0);
+}
+
// ********** file
FILE open(char* filename, int mode) {