
Macros | |
| #define | syscall0(NUMBER) |
| #define | syscall1(NUMBER, ARG0) |
| #define | syscall2(NUMBER, ARG0, ARG1) |
| #define | syscall3(NUMBER, ARG0, ARG1, ARG2) |
| #define | syscall4(NUMBER, ARG0, ARG1, ARG2, ARG3) |
| #define | syscall5(NUMBER, ARG0, ARG1, ARG2, ARG3, ARG4) |
Functions | |
| __attribute__ ((always_inline)) | |
| void | halt (void) |
| 핀토스 자체를 종료시키는 시스템 콜 More... | |
| void | exit (int status) |
| 현재 프로세스를 종료시키는 시스템 콜 More... | |
| pid_t | fork (const char *thread_name) |
| int | exec (const char *file) |
| cmd_line으로 들어온 실행 파일을 실행한다. More... | |
| int | wait (pid_t pid) |
| 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 size) |
| 열린 파일의 데이터를 읽는 시스템 콜 More... | |
| int | write (int fd, const void *buffer, unsigned size) |
| 열린 파일에 데이터를 쓰는 시스템 콜 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) |
| int | mount (const char *path, int chan_no, int dev_no) |
| int | umount (const char *path) |
| #define syscall0 | ( | NUMBER | ) |
| #define syscall1 | ( | NUMBER, | |
| ARG0 | |||
| ) |
| #define syscall2 | ( | NUMBER, | |
| ARG0, | |||
| ARG1 | |||
| ) |
| #define syscall3 | ( | NUMBER, | |
| ARG0, | |||
| ARG1, | |||
| ARG2 | |||
| ) |
| #define syscall4 | ( | NUMBER, | |
| ARG0, | |||
| ARG1, | |||
| ARG2, | |||
| ARG3 | |||
| ) |
| #define syscall5 | ( | NUMBER, | |
| ARG0, | |||
| ARG1, | |||
| ARG2, | |||
| ARG3, | |||
| ARG4 | |||
| ) |
| __attribute__ | ( | (always_inline) | ) |

| bool chdir | ( | const char * | dir | ) |
| void close | ( | int | 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 | ) |
| void exit | ( | int | status | ) |
현재 프로세스를 종료시키는 시스템 콜
종료 시 출력 : "${프로세스 명}: exit(${프로세스 상태})\n"
process_exit()에 존재
| status | 정상 종료 시, 0 |

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

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


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

| int mount | ( | const char * | path, |
| int | chan_no, | ||
| int | dev_no | ||
| ) |
| void munmap | ( | void * | addr | ) |
mmap으로 매핑된 주소를 해제한다.
| addr |

| int open | ( | const char * | 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 | ||
| ) |
| int symlink | ( | const char * | target, |
| const char * | linkpath | ||
| ) |
| unsigned tell | ( | int | fd | ) |
| int umount | ( | const char * | path | ) |
| int wait | ( | pid_t | pid | ) |