PKUOS - Pintos
Pintos source browser for PKU Operating System course
syscall-nr.h
Go to the documentation of this file.
1#ifndef __LIB_SYSCALL_NR_H
2#define __LIB_SYSCALL_NR_H
3
4/** System call numbers. */
5enum
6 {
7 /* Projects 2 and later. */
8 SYS_HALT, /**< Halt the operating system. */
9 SYS_EXIT, /**< Terminate this process. */
10 SYS_EXEC, /**< Start another process. */
11 SYS_WAIT, /**< Wait for a child process to die. */
12 SYS_CREATE, /**< Create a file. */
13 SYS_REMOVE, /**< Delete a file. */
14 SYS_OPEN, /**< Open a file. */
15 SYS_FILESIZE, /**< Obtain a file's size. */
16 SYS_READ, /**< Read from a file. */
17 SYS_WRITE, /**< Write to a file. */
18 SYS_SEEK, /**< Change position in a file. */
19 SYS_TELL, /**< Report current position in a file. */
20 SYS_CLOSE, /**< Close a file. */
21
22 /* Project 3 and optionally project 4. */
23 SYS_MMAP, /**< Map a file into memory. */
24 SYS_MUNMAP, /**< Remove a memory mapping. */
25
26 /* Project 4 only. */
27 SYS_CHDIR, /**< Change the current directory. */
28 SYS_MKDIR, /**< Create a directory. */
29 SYS_READDIR, /**< Reads a directory entry. */
30 SYS_ISDIR, /**< Tests if a fd represents a directory. */
31 SYS_INUMBER /**< Returns the inode number for a fd. */
32 };
33
34#endif /**< lib/syscall-nr.h */
@ SYS_MMAP
Map a file into memory.
Definition: syscall-nr.h:23
@ SYS_WRITE
Write to a file.
Definition: syscall-nr.h:17
@ SYS_TELL
Report current position in a file.
Definition: syscall-nr.h:19
@ SYS_HALT
Halt the operating system.
Definition: syscall-nr.h:8
@ SYS_READ
Read from a file.
Definition: syscall-nr.h:16
@ SYS_CREATE
Create a file.
Definition: syscall-nr.h:12
@ SYS_CLOSE
Close a file.
Definition: syscall-nr.h:20
@ SYS_INUMBER
Returns the inode number for a fd.
Definition: syscall-nr.h:31
@ SYS_EXEC
Start another process.
Definition: syscall-nr.h:10
@ SYS_MUNMAP
Remove a memory mapping.
Definition: syscall-nr.h:24
@ SYS_EXIT
Terminate this process.
Definition: syscall-nr.h:9
@ SYS_OPEN
Open a file.
Definition: syscall-nr.h:14
@ SYS_ISDIR
Tests if a fd represents a directory.
Definition: syscall-nr.h:30
@ SYS_FILESIZE
Obtain a file's size.
Definition: syscall-nr.h:15
@ SYS_WAIT
Wait for a child process to die.
Definition: syscall-nr.h:11
@ SYS_MKDIR
Create a directory.
Definition: syscall-nr.h:28
@ SYS_CHDIR
Change the current directory.
Definition: syscall-nr.h:27
@ SYS_READDIR
Reads a directory entry.
Definition: syscall-nr.h:29
@ SYS_REMOVE
Delete a file.
Definition: syscall-nr.h:13
@ SYS_SEEK
Change position in a file.
Definition: syscall-nr.h:18