diff --git a/src/threads/thread.h b/src/threads/thread.h index a4a2439..4e719a7 100644 --- a/src/threads/thread.h +++ b/src/threads/thread.h @@ -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. */