summaryrefslogtreecommitdiffstats
path: root/pintos-progos/threads
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2012-03-26 22:05:09 +0200
committermanuel <manuel@mausz.at>2012-03-26 22:05:09 +0200
commit1a39d0619947a0a3cda8322e5856975ba46c602d (patch)
tree411c8ee27fd75756dd73e52ff1c622dd2c5c9356 /pintos-progos/threads
parent11c1519a12cdae1ce05d31a6e389a103259c6c93 (diff)
downloadprogos-1a39d0619947a0a3cda8322e5856975ba46c602d.tar.gz
progos-1a39d0619947a0a3cda8322e5856975ba46c602d.tar.bz2
progos-1a39d0619947a0a3cda8322e5856975ba46c602d.zip
- rename alarm list/tick to wakeup list/tick
- order wakeup list by wakeup tick in ascending order which allows to bail out early inside timer_interrupt
Diffstat (limited to 'pintos-progos/threads')
-rw-r--r--pintos-progos/threads/thread.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/pintos-progos/threads/thread.h b/pintos-progos/threads/thread.h
index 9cc5ef7..4ba5ef2 100644
--- a/pintos-progos/threads/thread.h
+++ b/pintos-progos/threads/thread.h
@@ -77,12 +77,12 @@ typedef int tid_t;
77 value, triggering the assertion. */ 77 value, triggering the assertion. */
78/* The `elem' member has a dual purpose. It can be an element in 78/* The `elem' member has a dual purpose. It can be an element in
79 the run queue (thread.c), it can be an element in a semaphore 79 the run queue (thread.c), it can be an element in a semaphore
80 wait list (synch.c), or it can be an element in the alarm sleep 80 wait list (synch.c), or it can be an element in the timer/alarm sleep
81 list (timer.c). It can be used these two ways only because they 81 list (timer.c). It can be used these three ways only because they
82 are mutually exclusive: only a thread in the ready state is on 82 are mutually exclusive: only a thread in the ready state is on
83 the run queue, only a thread in the blocked state is on a semaphore 83 the run queue, only a thread in the blocked state is on a semaphore
84 wait list, whereas only a thread waiting for an alarm event is on 84 wait list, whereas only a thread waiting for an timer/alarm event is on
85 the alarm sleep list. */ 85 the timer/alarm sleep list. */
86struct thread 86struct thread
87 { 87 {
88 /* Owned by thread.c. */ 88 /* Owned by thread.c. */
@@ -106,7 +106,7 @@ struct thread
106 /* Owned by thread.c. */ 106 /* Owned by thread.c. */
107 unsigned magic; /* Detects stack overflow. */ 107 unsigned magic; /* Detects stack overflow. */
108 108
109 int64_t alarm_tick; /* absolute tick when to trigger an alarm event */ 109 int64_t wakeup_tick; /* absolute tick when to wake up the thread */
110 }; 110 };
111 111
112/* If false (default), use round-robin scheduler. 112/* If false (default), use round-robin scheduler.