a594016cb1ff1db565f5739a97169f873d00167a
[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
9 void halt (void) NO_RETURN;
10 void exit (int status) NO_RETURN;
11 pid_t exec (const char *file);
12 int join (pid_t);
13 bool create (const char *file);
14 bool remove (const char *file);
15 int open (const char *file);
16 int filesize (int fd);
17 int read (int fd, void *buffer, unsigned length);
18 int write (int fd, const void *buffer, unsigned length);
19 void close (int fd);
20 bool mmap (int fd, void *addr, unsigned length);
21 bool munmap (void *addr, unsigned length);
22 bool chdir (const char *dir);
23 bool mkdir (const char *dir);
24 void lsdir (void);
25
26 #endif /* lib/user/syscall.h */