From 13753f29344700c01d9dc80834e51c7303ed18f7 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 9 Apr 2006 19:52:36 +0000 Subject: [PATCH] Remove fixed item. --- TODO | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/TODO b/TODO index 5bf19c1..95bf2ae 100644 --- a/TODO +++ b/TODO @@ -109,29 +109,6 @@ Subject: 3 questions about switch_threads() in switch.S To: blp@cs.stanford.edu, joshwise@stanford.edu Date: Fri, 3 Mar 2006 17:09:21 -0800 -QUESTION 1 - -In the section - - # Save current stack pointer to old thread's stack, if any. - movl SWITCH_CUR(%esp), %eax - test %eax, %eax - jz 1f - movl %esp, (%eax,%edx,1) -1: - - # Restore stack pointer from new thread's stack. - movl SWITCH_NEXT(%esp), %ecx - movl (%ecx,%edx,1), %esp - -why are we saving the current stack pointer only if the "cur" thread pointer -is non-NULL ? Isn't it gauranteed to be non-NULL because switch_threads() is -only called form schedule(), where we have - - struct thread *cur = running_thread (); - -which should always be non-NULL (given the way kernel pool is laid out). - QUESTION 2 # This stack frame must match the one set up by thread_create(). -- 2.30.2