1#ifndef THREADS_THREAD_H
2#define THREADS_THREAD_H
26#define TID_ERROR ((tid_t) -1)
35#define FDCOUNT_LIMIT FDT_PAGES *(1<<9)
#define NO_RETURN
Definition: debug.h:8
#define UNUSED
Definition: debug.h:7
signed long long int int64_t
Definition: stdint.h:16
unsigned long long int uint64_t
Definition: stdint.h:29
Definition: interrupt.h:37
struct list_elem child_elem
Definition: thread.h:128
int priority
Definition: thread.h:105
struct lock * wait_on_lock
Definition: thread.h:108
int next_fd
Definition: thread.h:123
void * stack_bottom
Definition: thread.h:144
uint64_t * pml4
Definition: thread.h:121
struct list_elem d_elem
Definition: thread.h:115
int64_t wakeup_tick
Definition: thread.h:109
unsigned magic
Definition: thread.h:151
struct list_elem elem
Definition: thread.h:112
char name[16]
Definition: thread.h:104
struct supplemental_page_table spt
Definition: thread.h:143
tid_t tid
Definition: thread.h:102
struct list donations
Definition: thread.h:114
void * rsp_stack
Definition: thread.h:145
int priority_base
Definition: thread.h:107
struct intr_frame parent_if
Definition: thread.h:126
enum thread_status status
Definition: thread.h:103
int exit_status
Definition: thread.h:131
struct file * running
Definition: thread.h:130
struct semaphore free_sema
Definition: thread.h:134
struct intr_frame tf
Definition: thread.h:150
struct file ** fdt
Definition: thread.h:122
struct list child_list
Definition: thread.h:127
struct semaphore fork_sema
Definition: thread.h:133
struct semaphore wait_sema
Definition: thread.h:135
struct thread * thread_current(void)
Definition: thread.c:301
void thread_start(void)
Definition: thread.c:140
void thread_sleep(int64_t ticks)
Definition: thread.c:365
void thread_awake(int64_t ticks)
Definition: thread.c:405
int thread_get_nice(void)
Definition: thread.c:463
bool thread_mlfqs
Definition: thread.c:62
thread_status
Definition: thread.h:16
@ THREAD_BLOCKED
Definition: thread.h:19
@ THREAD_DYING
Definition: thread.h:20
@ THREAD_RUNNING
Definition: thread.h:17
@ THREAD_READY
Definition: thread.h:18
void thread_init(void)
Definition: thread.c:110
void thread_unblock(struct thread *)
Definition: thread.c:275
int thread_get_priority(void)
Definition: thread.c:441
bool cmp_priority(const struct list_elem *a, const struct list_elem *b, void *aux UNUSED)
Definition: thread.c:449
int tid_t
Definition: thread.h:25
const char * thread_name(void)
Definition: thread.c:293
void do_iret(struct intr_frame *tf)
Definition: thread.c:577
int thread_get_recent_cpu(void)
Definition: thread.c:477
void thread_tick(void)
Definition: thread.c:156
void thread_yield(void)
Definition: thread.c:343
void thread_set_nice(int)
tid_t thread_create(const char *name, int priority, thread_func *, void *)
Definition: thread.c:197
int64_t get_global_ticks(void)
Definition: thread.c:390
tid_t thread_tid(void)
Definition: thread.c:317
void thread_set_priority(int)
Definition: thread.c:426
void thread_block(void)
Definition: thread.c:258
void thread_func(void *aux)
Definition: thread.h:165
void set_global_ticks(int64_t ticks)
Definition: thread.c:397
int thread_get_load_avg(void)
Definition: thread.c:470
void thread_print_stats(void)
Definition: thread.c:176
void thread_exit(void) NO_RETURN
Definition: thread.c:325
static int64_t ticks
Definition: timer.c:22