Add donation-related information to the thread structure, w/ T

This commit is contained in:
sBubshait
2024-10-20 17:04:14 +01:00
parent 6b9b671368
commit 8b1e0b9559

View File

@@ -90,6 +90,15 @@ struct thread
int priority; /* Priority. */
struct list_elem allelem; /* List element for all threads list. */
/* Donation Related */
int base_priority; /* Base priority of the thread. */
struct list donors_list; /* List of threads that have donated
to this thread. */
struct lock *waiting_lock; /* The lock that the current thread is
waiting for. */
struct list_elem donor_elem; /* List element so that thread can be
enlisted in other donors list. */
/* Shared between thread.c and synch.c. */
struct list_elem elem; /* List element. */