Make tests public. Rewrite most tests. Add tests.
[pintos-anon] / src / lib / user / syscall.c
index aaeb109314775c49f626e3bf9b27445a96d93416..6cc02d1df3df4c5c14bf19c95726f46d3edd9bfe 100644 (file)
@@ -82,9 +82,9 @@ exec (const char *file)
 }
 
 int
-join (pid_t pid)
+wait (pid_t pid)
 {
-  return syscall1 (SYS_join, pid);
+  return syscall1 (SYS_wait, pid);
 }
 
 bool
@@ -141,16 +141,16 @@ close (int fd)
   syscall1 (SYS_close, fd);
 }
 
-bool
-mmap (int fd, void *addr, unsigned length)
+mapid_t
+mmap (int fd, void *addr)
 {
-  return syscall3 (SYS_mmap, fd, addr, length);
+  return syscall2 (SYS_mmap, fd, addr);
 }
 
-bool
-munmap (void *addr, unsigned length)
+void
+munmap (mapid_t mapid)
 {
-  return syscall2 (SYS_munmap, addr, length);
+  syscall1 (SYS_munmap, mapid);
 }
 
 bool