#include <stdbool.h>#include <debug.h>Go to the source code of this file.
Defines | |
| #define | PID_ERROR ((pid_t) -1) |
| #define | MAP_FAILED ((mapid_t) -1) |
| #define | READDIR_MAX_LEN 14 |
| #define | EXIT_SUCCESS 0 |
| #define | EXIT_FAILURE 1 |
Typedefs | |
| typedef int | pid_t |
| typedef int | mapid_t |
Functions | |
| void | halt (void) NO_RETURN |
| void | exit (int status) NO_RETURN |
| pid_t | exec (const char *file) |
| int | wait (pid_t) |
| bool | create (const char *file, unsigned initial_size) |
| bool | remove (const char *file) |
| int | open (const char *file) |
| int | filesize (int fd) |
| int | read (int fd, void *buffer, unsigned length) |
| int | write (int fd, const void *buffer, unsigned length) |
| void | seek (int fd, unsigned position) |
| unsigned | tell (int fd) |
| void | close (int fd) |
| mapid_t | mmap (int fd, void *addr) |
| void | munmap (mapid_t) |
| bool | chdir (const char *dir) |
| bool | mkdir (const char *dir) |
| bool | readdir (int fd, char name[READDIR_MAX_LEN+1]) |
| bool | isdir (int fd) |
| int | inumber (int fd) |
| #define EXIT_FAILURE 1 |
| #define MAP_FAILED ((mapid_t) -1) |
| #define PID_ERROR ((pid_t) -1) |
| #define READDIR_MAX_LEN 14 |
Definition at line 16 of file syscall.h.
Referenced by archive_directory(), getcwd(), list_dir(), and test_main().
| bool chdir | ( | const char * | dir | ) |
| void close | ( | int | fd | ) |
Definition at line 139 of file syscall.c.
References SYS_CLOSE, and syscall1.
Referenced by archive_file(), check_file(), get_inumber(), getcwd(), handle_error(), list_dir(), main(), make_tar_archive(), make_tree(), seq_test(), sort_chunks(), test_main(), and try_write().
| bool create | ( | const char * | file, | |
| unsigned | initial_size | |||
| ) |
Definition at line 91 of file syscall.c.
References SYS_CREATE, and syscall2.
Referenced by do_touch(), main(), make_tar_archive(), seq_test(), sort_chunks(), and test_main().
| pid_t exec | ( | const char * | file | ) |
Definition at line 79 of file syscall.c.
References SYS_EXEC, and syscall1.
Referenced by exec_children(), main(), sort_chunks(), spawn_child(), and test_main().
| int filesize | ( | int | fd | ) |
Definition at line 109 of file syscall.c.
References SYS_FILESIZE, and syscall1.
Referenced by archive_ordinary_file(), check_file_handle(), check_file_size(), list_dir(), and main().
| void halt | ( | void | ) |
Definition at line 65 of file syscall.c.
References NOT_REACHED, SYS_HALT, and syscall0.
Referenced by main(), and test_main().
| int inumber | ( | int | fd | ) |
Definition at line 181 of file syscall.c.
References SYS_INUMBER, and syscall1.
Referenced by archive_file(), get_inumber(), getcwd(), list_dir(), and test_main().
| bool isdir | ( | int | fd | ) |
Definition at line 175 of file syscall.c.
References SYS_ISDIR, and syscall1.
Referenced by archive_file(), and list_dir().
| bool mkdir | ( | const char * | dir | ) |
Definition at line 163 of file syscall.c.
References SYS_MKDIR, and syscall1.
Referenced by do_mkdir(), main(), and test_main().
| mapid_t mmap | ( | int | fd, | |
| void * | addr | |||
| ) |
| void munmap | ( | mapid_t | ) |
Definition at line 151 of file syscall.c.
References SYS_MUNMAP, and syscall1.
Referenced by main(), and test_main().
| int open | ( | const char * | file | ) |
Definition at line 103 of file syscall.c.
References SYS_OPEN, and syscall1.
Referenced by archive_file(), check_file(), consume_some_resources(), consume_some_resources_and_die(), get_inumber(), getcwd(), list_dir(), main(), make_tar_archive(), make_tree(), remove_tree(), seq_test(), sort_chunks(), test_main(), try_write(), and wrap_open().
| int read | ( | int | fd, | |
| void * | buffer, | |||
| unsigned | length | |||
| ) |
Definition at line 115 of file syscall.c.
References SYS_READ, and syscall3.
Referenced by archive_ordinary_file(), check_file_handle(), main(), read_line(), relay(), sort_chunks(), and test_main().
| bool readdir | ( | int | fd, | |
| char | name[READDIR_MAX_LEN+1] | |||
| ) |
Definition at line 169 of file syscall.c.
References name, SYS_READDIR, and syscall2.
Referenced by archive_directory(), getcwd(), list_dir(), and test_main().
| bool remove | ( | const char * | file | ) |
| void seek | ( | int | fd, | |
| unsigned | position | |||
| ) |
| unsigned tell | ( | int | fd | ) |
| int write | ( | int | fd, | |
| const void * | buffer, | |||
| unsigned | length | |||
| ) |
Definition at line 121 of file syscall.c.
References SYS_WRITE, and syscall3.
Referenced by do_write(), flush(), main(), page_fault(), putchar(), puts(), relay(), seq_test(), sigchld_handler(), sort_chunks(), test_main(), try_write(), vmsg(), and write_some_bytes().
1.5.6