

Go to the source code of this file.
Macros | |
| #define | PID_ERROR ((pid_t) -1) |
| #define | MAP_FAILED ((void *) NULL) |
| #define | READDIR_MAX_LEN 14 |
| #define | EXIT_SUCCESS 0 /* Successful execution. */ |
| #define | EXIT_FAILURE 1 /* Unsuccessful execution. */ |
Typedefs | |
| typedef int | pid_t |
| typedef int | off_t |
Functions | |
| void | halt (void) NO_RETURN |
| 핀토스 자체를 종료시키는 시스템 콜 More... | |
| void | exit (int status) NO_RETURN |
| 현재 프로세스를 종료시키는 시스템 콜 More... | |
| pid_t | fork (const char *thread_name) |
| int | exec (const char *file) |
| cmd_line으로 들어온 실행 파일을 실행한다. More... | |
| int | wait (pid_t) |
| pid에 해당하는 자식 프로세스가 종료될 때까지 기다린다. More... | |
| bool | create (const char *file, unsigned initial_size) |
| 파일을 생성하는 시스템 콜 More... | |
| bool | remove (const char *file) |
| 파일을 샂게하는 시스템 콜 More... | |
| int | open (const char *file) |
| 파일을 열 때 사용하는 시스템 콜 More... | |
| int | filesize (int fd) |
| 파일의 크기를 알려주는 시스템 콜 More... | |
| int | read (int fd, void *buffer, unsigned length) |
| 열린 파일의 데이터를 읽는 시스템 콜 More... | |
| int | write (int fd, const void *buffer, unsigned length) |
| 열린 파일에 데이터를 쓰는 시스템 콜 More... | |
| void | seek (int fd, unsigned position) |
| 열린 파일의 위치를 이동하는 시스템 콜 More... | |
| unsigned | tell (int fd) |
| 열린 파일의 위치를 알려주는 시스템 콜 More... | |
| void | close (int fd) |
| 열린 파일을 닫는 시스템 콜 More... | |
| int | dup2 (int oldfd, int newfd) |
| void * | mmap (void *addr, size_t length, int writable, int fd, off_t offset) |
| 열린 파일을 가상 주소 공간에 매핑한다. More... | |
| void | munmap (void *addr) |
| mmap으로 매핑된 주소를 해제한다. More... | |
| 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) |
| int | symlink (const char *target, const char *linkpath) |
| static void * | get_phys_addr (void *user_addr) |
| static long long | get_fs_disk_read_cnt (void) |
| static long long | get_fs_disk_write_cnt (void) |
| #define EXIT_FAILURE 1 /* Unsuccessful execution. */ |
| #define EXIT_SUCCESS 0 /* Successful execution. */ |
| #define MAP_FAILED ((void *) NULL) |
| #define PID_ERROR ((pid_t) -1) |
| #define READDIR_MAX_LEN 14 |
| typedef int off_t |
| typedef int pid_t |
| bool chdir | ( | const char * | dir | ) |
| void close | ( | int | fd | ) |
열린 파일을 닫는 시스템 콜
파일을 닫고 fd를 제거한다.
| fd |


| bool create | ( | const char * | file, |
| unsigned | initial_size | ||
| ) |
파일을 생성하는 시스템 콜
filesys_create (const char *name, off_t initial_size)
| file | 생성할 파일의 이름 및 경로 정보 |
| initial_size | 생성할 파일의 크기 |


| int dup2 | ( | int | oldfd, |
| int | newfd | ||
| ) |
| int exec | ( | const char * | file | ) |
cmd_line으로 들어온 실행 파일을 실행한다.
| file | 실행하려는 파일 이름 |


| void exit | ( | int | status | ) |
현재 프로세스를 종료시키는 시스템 콜
종료 시 출력 : "${프로세스 명}: exit(${프로세스 상태})\n"
process_exit()에 존재
| status | 정상 종료 시, 0 |


| int filesize | ( | int | fd | ) |
파일의 크기를 알려주는 시스템 콜
| fd |


| pid_t fork | ( | const char * | thread_name | ) |


|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| void halt | ( | void | ) |
| int inumber | ( | int | fd | ) |
| bool isdir | ( | int | fd | ) |
| bool mkdir | ( | const char * | dir | ) |
열린 파일을 가상 주소 공간에 매핑한다.
| addr | |
| length | |
| writable | |
| fd | |
| offset |


| void munmap | ( | void * | addr | ) |
| int open | ( | const char * | file | ) |
파일을 열 때 사용하는 시스템 콜
| file | 파일의 이름 및 경로 정보 |


| int read | ( | int | fd, |
| void * | buffer, | ||
| unsigned | size | ||
| ) |
열린 파일의 데이터를 읽는 시스템 콜
| fd | |
| buffer | 읽은 데이터를 저장할 버퍼의 주소 값 |
| length | 읽을 데이터 크기 |


| bool readdir | ( | int | fd, |
| char | name[READDIR_MAX_LEN+1] | ||
| ) |
| bool remove | ( | const char * | file | ) |
파일을 샂게하는 시스템 콜
| file | 제거할 파일의 이름 및 경로 정보 |


| void seek | ( | int | fd, |
| unsigned | position | ||
| ) |
열린 파일의 위치를 이동하는 시스템 콜
| fd | |
| position | 현재 위치(offset)를 기준으로 이동할 거리 |


| int symlink | ( | const char * | target, |
| const char * | linkpath | ||
| ) |
| unsigned tell | ( | int | fd | ) |
열린 파일의 위치를 알려주는 시스템 콜
| fd |


| int wait | ( | tid_t | pid | ) |
pid에 해당하는 자식 프로세스가 종료될 때까지 기다린다.
| pid | 기다리려는 자식 프로세스의 pid |


| int write | ( | int | fd, |
| const void * | buffer, | ||
| unsigned | size | ||
| ) |
열린 파일에 데이터를 쓰는 시스템 콜
| fd | |
| buffer | |
| size |

