#[repr(usize)]pub enum SyscallNumber {
Show 22 variants
Exit = 0,
Open = 1,
Read = 2,
Write = 3,
Seek = 4,
Tell = 5,
Close = 6,
Pipe = 7,
Mmap = 8,
Munmap = 9,
Fork = 10,
ThreadCreate = 11,
ThreadJoin = 12,
ExitGroup = 13,
Create = 14,
Mkdir = 15,
Unlink = 16,
Chdir = 17,
Readdir = 18,
Stat = 19,
Fsync = 20,
GetPhys = 129,
}Expand description
Represents system call numbers used in project5.
Each variant corresponds to a specific system call that can be invoked using the system call interface. The numeric values align with the syscall table in the operating system.
Variants§
Exit = 0
Terminates the calling thread.
Open = 1
Opens a file and returns a file descriptor.
Read = 2
Reads data from a file descriptor.
Write = 3
Writes data to a file descriptor.
Seek = 4
Moves the file offset of an open file.
Tell = 5
Retrieves the current file offset.
Close = 6
Closes an open file descriptor.
Pipe = 7
Create an interprocess communication channel.
Mmap = 8
Map the memory.
Munmap = 9
Unmap the memory.
Fork = 10
Fork the process.
ThreadCreate = 11
Create a thread.
ThreadJoin = 12
Join a Thread.
ExitGroup = 13
Terminates the process, by terminating all threads.
Create = 14
Create a regular file.
Mkdir = 15
Make a directory.
Unlink = 16
Unlink a file.
Chdir = 17
Change the current working directory.
Readdir = 18
Read the contents of a directory.
Stat = 19
Stat a file.
Fsync = 20
Synchronize a file’s in-memory state with disk.
GetPhys = 129
Get Physical Address of Page (for grading purposes only)