Move problem 1-2 (join) into project 2 as the "wait" system call.
[pintos-anon] / src / lib / user / syscall.h
1 #ifndef __LIB_USER_SYSCALL_H
2 #define __LIB_USER_SYSCALL_H
3
4 #include <stdbool.h>
5 #include <debug.h>
6
7 typedef int pid_t;
8 #define PID_ERROR ((pid_t) -1)
9
10 typedef int mapid_t;
11 #define MAP_FAILED ((mapid_t) -1)
12
13 void halt (void) NO_RETURN;
14 void exit (int status) NO_RETURN;
15 pid_t exec (const char *file);
16 int wait (pid_t);
17 bool create (const char *file, unsigned initial_size);
18 bool remove (const char *file);
19 int open (const char *file);
20 int filesize (int fd);
21 int read (int fd, void *buffer, unsigned length);
22 int write (int fd, const void *buffer, unsigned length);
23 void seek (int fd, unsigned position);
24 unsigned tell (int fd);
25 void close (int fd);
26 mapid_t mmap (int fd, void *addr);
27 bool munmap (mapid_t);
28 bool chdir (const char *dir);
29 bool mkdir (const char *dir);
30 void lsdir (void);
31
32 #endif /* lib/user/syscall.h */