b0d073fe1d5e94b662e64946220fe5bcd7bba023
[pintos-anon] / src / lib / syscall-nr.h
1 #ifndef __LIB_SYSCALL_NR_H
2 #define __LIB_SYSCALL_NR_H
3
4 /* System call numbers. */
5 enum 
6   {
7     /* Projects 2 and later. */
8     SYS_HALT,                   /* Halt the operating system. */
9     SYS_EXIT,                   /* Terminate this process. */
10     SYS_WAIT,                   /* Wait for a child process to die. */
11     SYS_CREATE,                 /* Create a file. */
12     SYS_REMOVE,                 /* Delete a file. */
13     SYS_OPEN,                   /* Open a file. */
14     SYS_FILESIZE,               /* Obtain a file's size. */
15     SYS_READ,                   /* Read from a file. */
16     SYS_WRITE,                  /* Write to a file. */
17     SYS_SEEK,                   /* Change position in a file. */
18     SYS_TELL,                   /* Report current position in a file. */
19     SYS_CLOSE,                  /* Close a file. */
20
21     /* Project 3 and optionally project 4. */
22     SYS_MMAP,                   /* Map a file into memory. */
23     SYS_MUNMAP,                 /* Remove a memory mapping. */
24
25     /* Project 4 only. */
26     SYS_CHDIR,                  /* Change the current directory. */
27     SYS_MKDIR,                  /* Create a directory. */
28     SYS_LSDIR                   /* List the current directory to stdout. */
29   };
30
31 #endif /* lib/syscall-nr.h */