summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-02-21 20:16:10 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-02-21 20:16:10 +0100
commite40beeb936ff887afa9603c93aa804a4e5b4c7a9 (patch)
tree7a7172b561189b42e1fcd2d1ed753a18cfc64d68 /src
parent1fd6257c7dc5e7490f8fd7fc7a5316dc1419c0a6 (diff)
downloadpintos-e40beeb936ff887afa9603c93aa804a4e5b4c7a9.tar.gz
actually call process_execute
Diffstat (limited to 'src')
-rw-r--r--src/userprog/syscall.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/userprog/syscall.c b/src/userprog/syscall.c
index 65ebc7e..0df46f4 100644
--- a/src/userprog/syscall.c
+++ b/src/userprog/syscall.c
@@ -9,6 +9,7 @@
#include "filesys/filesys.h"
#include "filesys/off_t.h"
#include "lib/pid_t.h"
+#include "userprog/process.h"
#include "threads/init.h"
#include "threads/malloc.h"
@@ -144,9 +145,9 @@ close (int fd_i)
}
static pid_t
-exec (const char *file_name UNUSED)
+exec (const char *file_name)
{
- return -1;
+ return process_execute (file_name);
}
// cast to TYPE and deref argument N from f->esp