Go to the source code of this file.
◆ lazy_load_segment()
| bool lazy_load_segment |
( |
struct page * |
page, |
|
|
void * |
aux |
|
) |
| |
◆ process_activate()
| void process_activate |
( |
struct thread * |
next | ) |
|
379 {
380
382
383
385}
static int next(int pos)
Definition: intq.c:74
void pml4_activate(uint64_t *pml4)
Definition: mmu.c:205
void tss_update(struct thread *next)
Definition: tss.c:71
◆ process_create_initd()
| tid_t process_create_initd |
( |
const char * |
file_name | ) |
|
52 {
53 char *fn_copy, *save_ptr;
55
56
57
62
63 strtok_r (file_name,
" ", &save_ptr);
64
68 return tid;
69}
void * palloc_get_page(enum palloc_flags)
Definition: palloc.c:301
void palloc_free_page(void *)
Definition: palloc.c:333
static void initd(void *f_name)
Definition: process.c:73
#define NULL
Definition: stddef.h:4
size_t strlcpy(char *, const char *, size_t)
Definition: string.c:302
char * strtok_r(char *, const char *, char **)
Definition: string.c:219
#define PRI_DEFAULT
Definition: thread.h:30
#define TID_ERROR
Definition: thread.h:26
int tid_t
Definition: thread.h:25
tid_t thread_create(const char *name, int priority, thread_func *, void *)
Definition: thread.c:197
#define PGSIZE
Definition: vaddr.h:20
◆ process_exec()
| int process_exec |
( |
void * |
f_name | ) |
|
241 {
242 char *file_name = f_name;
243
244 bool success;
245
246
247
248
253
254 int argc = 0;
255 char *argv[128];
256
257
259
260
261 #ifdef VM
263 #endif
264
265
266
268
269
270 success =
load (file_name, &_if);
271
272
273
274 if (!success){
276 return -1;
277 }
278
280
282
283
286}
#define NOT_REACHED()
Definition: debug.h:34
#define FLAG_IF
Definition: flags.h:6
#define FLAG_MBS
Definition: flags.h:4
#define SEL_UCSEG
Definition: loader.h:39
#define SEL_UDSEG
Definition: loader.h:38
static bool load(const char *file_name, struct intr_frame *if_)
Definition: process.c:451
static void process_cleanup(void)
Definition: process.c:350
static void argument_parse(char *file_name, int *argc_ptr, char *argv[])
Definition: process.c:865
static void argument_stack(int argc, char **argv, struct intr_frame *if_)
Definition: process.c:874
Definition: interrupt.h:37
uint16_t ds
Definition: interrupt.h:44
struct thread * thread_current(void)
Definition: thread.c:301
void do_iret(struct intr_frame *tf)
Definition: thread.c:577
void supplemental_page_table_init(struct supplemental_page_table *spt)
◆ process_exit()
| void process_exit |
( |
void |
| ) |
|
328 {
330
331
332
333
334
338
340
342
345
346}
void file_close(struct file *file)
Definition: file.c:53
void close(int fd)
열린 파일을 닫는 시스템 콜
Definition: syscall.c:392
void palloc_free_multiple(void *, size_t page_cnt)
Definition: palloc.c:307
struct file * running
Definition: thread.h:130
struct file ** fdt
Definition: thread.h:122
struct semaphore wait_sema
Definition: thread.h:135
void sema_up(struct semaphore *)
Definition: synch.c:114
void thread_sleep(int64_t ticks)
Definition: thread.c:365
#define FDT_PAGES
Definition: thread.h:34
#define FDCOUNT_LIMIT
Definition: thread.h:35
◆ process_fork()
◆ process_wait()
| int process_wait |
( |
tid_t |
| ) |
|
◆ setup_stack()
673 {
675 bool success = false;
676
680 if (success)
682 else
684 }
685 return success;
686}
@ PAL_ZERO
Definition: palloc.h:10
@ PAL_USER
Definition: palloc.h:11
static bool install_page(void *upage, void *kpage, bool writable)
Definition: process.c:698
unsigned char uint8_t
Definition: stdint.h:20
uintptr_t rsp
Definition: interrupt.h:60
#define USER_STACK
Definition: vaddr.h:38