diff options
Diffstat (limited to 'threads/thread.h')
| -rw-r--r-- | threads/thread.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/threads/thread.h b/threads/thread.h index 4ba5ef2..a6ef25d 100644 --- a/threads/thread.h +++ b/threads/thread.h | |||
| @@ -107,6 +107,10 @@ struct thread | |||
| 107 | unsigned magic; /* Detects stack overflow. */ | 107 | unsigned magic; /* Detects stack overflow. */ |
| 108 | 108 | ||
| 109 | int64_t wakeup_tick; /* absolute tick when to wake up the thread */ | 109 | int64_t wakeup_tick; /* absolute tick when to wake up the thread */ |
| 110 | |||
| 111 | int is_donated; /* flag if threads priority has been donated by another thread */ | ||
| 112 | int saved_priority; /* saved base priority in case of priority dontation */ | ||
| 113 | struct list locks; /* list of locks we currently hold */ | ||
| 110 | }; | 114 | }; |
| 111 | 115 | ||
| 112 | /* If false (default), use round-robin scheduler. | 116 | /* If false (default), use round-robin scheduler. |
| @@ -114,6 +118,9 @@ struct thread | |||
| 114 | Controlled by kernel command-line option "-o mlfqs". */ | 118 | Controlled by kernel command-line option "-o mlfqs". */ |
| 115 | extern bool thread_mlfqs; | 119 | extern bool thread_mlfqs; |
| 116 | 120 | ||
| 121 | bool priority_list_cmp_greater (const struct list_elem *a, const struct list_elem *b, | ||
| 122 | void *aux); | ||
| 123 | |||
| 117 | void thread_init (void); | 124 | void thread_init (void); |
| 118 | void thread_start (void); | 125 | void thread_start (void); |
| 119 | 126 | ||
| @@ -139,6 +146,9 @@ void thread_foreach (thread_action_func *, void *); | |||
| 139 | 146 | ||
| 140 | int thread_get_priority (void); | 147 | int thread_get_priority (void); |
| 141 | void thread_set_priority (int); | 148 | void thread_set_priority (int); |
| 149 | void thread_other_set_priority (struct thread *t, int new_priority); | ||
| 150 | void thread_donate_priority (struct thread *donator, struct thread *donee); | ||
| 151 | void thread_donation_pass_back (void); | ||
| 142 | 152 | ||
| 143 | int thread_get_nice (void); | 153 | int thread_get_nice (void); |
| 144 | void thread_set_nice (int); | 154 | void thread_set_nice (int); |
