X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flib%2Fsyscall-nr.h;h=21a7af952f8728f93b77d6867ebbf60a7699864c;hb=bfc9e18a6723b2315ef521282a8b42119338ece9;hp=01851098fd28b24aee43715daa67267242956ba3;hpb=2cfc156c39840ce7f1cda6b473de1322691a8a0b;p=pintos-anon diff --git a/src/lib/syscall-nr.h b/src/lib/syscall-nr.h index 0185109..21a7af9 100644 --- a/src/lib/syscall-nr.h +++ b/src/lib/syscall-nr.h @@ -2,23 +2,33 @@ #define __LIB_SYSCALL_NR_H /* System call numbers. */ -#define SYS_halt 0 /* Halts the operating system. */ -#define SYS_exit 1 /* Terminates this process. */ -#define SYS_exec 2 /* Start another process. */ -#define SYS_wait 3 /* Waits for a child process to die. */ -#define SYS_create 4 /* Creates a file. */ -#define SYS_remove 5 /* Deletes a file. */ -#define SYS_open 6 /* Opens a file. */ -#define SYS_filesize 7 /* Obtains a file's size. */ -#define SYS_read 8 /* Reads from a file. */ -#define SYS_write 9 /* Writes to a file. */ -#define SYS_seek 10 /* Change position in a file. */ -#define SYS_tell 11 /* Report current position in a file. */ -#define SYS_close 12 /* Closes a file. */ -#define SYS_mmap 13 /* Maps a file into memory. */ -#define SYS_munmap 14 /* Removes a memory mapping. */ -#define SYS_chdir 15 /* Changes the current directory. */ -#define SYS_mkdir 16 /* Create a directory. */ -#define SYS_lsdir 17 /* Lists the current directory to stdout. */ +enum + { + /* Projects 2 and later. */ + SYS_HALT, /* Halt the operating system. */ + SYS_EXIT, /* Terminate this process. */ + SYS_EXEC, /* Start another process. */ + SYS_WAIT, /* Wait for a child process to die. */ + SYS_CREATE, /* Create a file. */ + SYS_REMOVE, /* Delete a file. */ + SYS_OPEN, /* Open a file. */ + SYS_FILESIZE, /* Obtain a file's size. */ + SYS_READ, /* Read from a file. */ + SYS_WRITE, /* Write to a file. */ + SYS_SEEK, /* Change position in a file. */ + SYS_TELL, /* Report current position in a file. */ + SYS_CLOSE, /* Close a file. */ + + /* Project 3 and optionally project 4. */ + SYS_MMAP, /* Map a file into memory. */ + SYS_MUNMAP, /* Remove a memory mapping. */ + + /* Project 4 only. */ + SYS_CHDIR, /* Change the current directory. */ + SYS_MKDIR, /* Create a directory. */ + SYS_READDIR, /* Reads a directory entry. */ + SYS_ISDIR, /* Tests if a fd represents a directory. */ + SYS_INUMBER /* Returns the inode number for a fd. */ + }; #endif /* lib/syscall-nr.h */