[Krafton Jungle] PintOS 2.0.0
크래프톤 정글 PintOS
 
Loading...
Searching...
No Matches
syscall.h File Reference
#include "threads/synch.h"
Include dependency graph for syscall.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void syscall_init (void)
 
void close (int fd)
 열린 파일을 닫는 시스템 콜 More...
 

Variables

struct lock filesys_lock
 

Function Documentation

◆ close()

void close ( int  fd)

열린 파일을 닫는 시스템 콜

파일을 닫고 fd를 제거한다.

Parameters
fd
139 {
140 syscall1 (SYS_CLOSE, fd);
141}
#define syscall1(NUMBER, ARG0)
Definition: syscall.c:39
@ SYS_CLOSE
Definition: syscall-nr.h:20
Here is the caller graph for this function:

◆ syscall_init()

void syscall_init ( void  )
74 {
75 write_msr(MSR_STAR, ((uint64_t)SEL_UCSEG - 0x10) << 48 |
76 ((uint64_t)SEL_KCSEG) << 32);
77 write_msr(MSR_LSTAR, (uint64_t) syscall_entry);
78
79 /* The interrupt service rountine should not serve any interrupts
80 * until the syscall_entry swaps the userland stack to the kernel
81 * mode stack. Therefore, we masked the FLAG_FL. */
82 write_msr(MSR_SYSCALL_MASK,
84
85 /*------------------------- [P2] System Call --------------------------*/
86 lock_init(&filesys_lock); // 파일 읽고 쓰기에 필요한 락 초기화 _defined "userprog/syscall.h"
87}
#define FLAG_DF
Definition: flags.h:7
#define FLAG_IOPL
Definition: flags.h:8
#define FLAG_IF
Definition: flags.h:6
#define FLAG_AC
Definition: flags.h:9
#define FLAG_TF
Definition: flags.h:5
#define FLAG_NT
Definition: flags.h:10
#define SEL_UCSEG
Definition: loader.h:39
#define SEL_KCSEG
Definition: loader.h:36
unsigned long long int uint64_t
Definition: stdint.h:29
void lock_init(struct lock *)
Definition: synch.c:186
#define MSR_SYSCALL_MASK
Definition: syscall.c:71
#define MSR_STAR
Definition: syscall.c:69
#define MSR_LSTAR
Definition: syscall.c:70
void syscall_entry(void)
struct lock filesys_lock
Definition: syscall.h:10
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ filesys_lock

struct lock filesys_lock