aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/syscall-nr.h
diff options
context:
space:
mode:
authorklaar36 <klas.arvidsson@liu.se>2015-03-20 17:30:24 +0100
committerklaar36 <klas.arvidsson@liu.se>2015-03-20 17:30:24 +0100
commite7bc50ca8ffcaa6ed68ebd2315f78b0f5a7d10ad (patch)
tree4de97af7207676b69cb6a9aba8cb443cc134855d /src/lib/syscall-nr.h
parentb0418a24e709f0632d2ede5b0f327c422931939b (diff)
downloadpintos-rs-e7bc50ca8ffcaa6ed68ebd2315f78b0f5a7d10ad.tar.gz
Initial Pintos
Diffstat (limited to 'src/lib/syscall-nr.h')
-rw-r--r--src/lib/syscall-nr.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/lib/syscall-nr.h b/src/lib/syscall-nr.h
new file mode 100644
index 0000000..ccacbd6
--- /dev/null
+++ b/src/lib/syscall-nr.h
@@ -0,0 +1,36 @@
+#ifndef __LIB_SYSCALL_NR_H
+#define __LIB_SYSCALL_NR_H
+
+/* System call numbers. */
+enum
+ {
+ /* The basic systemcalls. The ones you will implement. */
+ 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. */
+
+ /* Memory mapping system calls. */
+ SYS_MMAP, /* Map a file into memory. */
+ SYS_MUNMAP, /* Remove a memory mapping. */
+
+ /* Filesystem system calls. */
+ 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. */
+
+ SYS_NUMBER_OF_CALLS
+ };
+
+#endif /* lib/syscall-nr.h */