From 1a39d0619947a0a3cda8322e5856975ba46c602d Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 26 Mar 2012 22:05:09 +0200 Subject: - 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 --- pintos-progos/threads/thread.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pintos-progos/threads/thread.h') 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; value, triggering the assertion. */ /* The `elem' member has a dual purpose. It can be an element in the run queue (thread.c), it can be an element in a semaphore - wait list (synch.c), or it can be an element in the alarm sleep - list (timer.c). It can be used these two ways only because they + wait list (synch.c), or it can be an element in the timer/alarm sleep + list (timer.c). It can be used these three ways only because they are mutually exclusive: only a thread in the ready state is on the run queue, only a thread in the blocked state is on a semaphore - wait list, whereas only a thread waiting for an alarm event is on - the alarm sleep list. */ + wait list, whereas only a thread waiting for an timer/alarm event is on + the timer/alarm sleep list. */ struct thread { /* Owned by thread.c. */ @@ -106,7 +106,7 @@ struct thread /* Owned by thread.c. */ unsigned magic; /* Detects stack overflow. */ - int64_t alarm_tick; /* absolute tick when to trigger an alarm event */ + int64_t wakeup_tick; /* absolute tick when to wake up the thread */ }; /* If false (default), use round-robin scheduler. -- cgit v1.2.3