Rename schedule_tail() to thread_schedule_tail().
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 7 Nov 2008 05:55:33 +0000 (21:55 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 7 Nov 2008 05:55:33 +0000 (21:55 -0800)
This makes its name fit the convention that the file name is used as
a prefix for global symbol names.

Found by Godmar with his process-linker-map.pl script.

doc/reference.texi
src/lib/kernel/console.c
src/threads/switch.S
src/threads/thread.c
src/userprog/tss.c

index 924fd7815bdcc8fa4fe9bcf25e2fa36f5e2fa511..bfa076081eafaf74591d50f537d6be4b63b67e0e 100644 (file)
@@ -501,7 +501,7 @@ CPU's current stack pointer in the current @struct{thread}'s @code{stack}
 member, restores the new thread's @code{stack} into the CPU's stack
 pointer, restores registers from the stack, and returns.
 
-The rest of the scheduler is implemented in @func{schedule_tail}.  It
+The rest of the scheduler is implemented in @func{thread_schedule_tail}.  It
 marks the new thread as running.  If the thread we just switched from
 is in the dying state, then it also frees the page that contained the
 dying thread's @struct{thread} and stack.  These couldn't be freed
@@ -530,8 +530,8 @@ pointer,@footnote{This is because @func{switch_threads} takes
 arguments on the stack and the 80@var{x}86 SVR4 calling convention
 requires the caller, not the called function, to remove them when the
 call is complete.  See @bibref{SysV-i386} chapter 3 for details.}
-calls @func{schedule_tail} (this special case is why
-@func{schedule_tail} is separate from @func{schedule}), and returns.
+calls @func{thread_schedule_tail} (this special case is why
+@func{thread_schedule_tail} is separate from @func{schedule}), and returns.
 We fill in its stack frame so that it returns into
 @func{kernel_thread}, a function in @file{threads/thread.c}.
 
index 0d031b5b4bdd6a2257f416bdf1fc1ffdbbb4398e..844b18468bde5c3b828bb4455213aed6949f0f13 100644 (file)
@@ -37,17 +37,17 @@ static bool use_console_lock;
 
    lock_console()
    vprintf()
-   printf()             - palloc() tries to grab the lock again
+   printf()               - palloc() tries to grab the lock again
    palloc_free()        
-   schedule_tail()      - another thread dying as we switch threads
+   thread_schedule_tail() - another thread dying as we switch threads
    schedule()
    thread_yield()
-   intr_handler()       - timer interrupt
+   intr_handler()         - timer interrupt
    intr_set_level()
    serial_putc()
    putchar_have_lock()
    putbuf()
-   sys_write()          - one process writing to the console
+   sys_write()            - one process writing to the console
    syscall_handler()
    intr_handler()
 
index 244249e07c063594fc3f385937781d22b0bd2371..feca86cd16d02e3d6f31d1dde25cff379c0861a4 100644 (file)
@@ -54,10 +54,10 @@ switch_entry:
        # Discard switch_threads() arguments.
        addl $8, %esp
 
-       # Call schedule_tail(prev).
+       # Call thread_schedule_tail(prev).
        pushl %eax
-.globl schedule_tail
-       call schedule_tail
+.globl thread_schedule_tail
+       call thread_schedule_tail
        addl $4, %esp
 
        # Start thread proper.
index 2532463bdbbf5d8f2544cba0b590ae070d2d07e1..955ccdcfef958179dd285de2f4049e96c37c77ba 100644 (file)
@@ -68,7 +68,7 @@ static void init_thread (struct thread *, const char *name, int priority);
 static bool is_thread (struct thread *) UNUSED;
 static void *alloc_frame (struct thread *, size_t size);
 static void schedule (void);
-void schedule_tail (struct thread *prev);
+void thread_schedule_tail (struct thread *prev);
 static tid_t allocate_tid (void);
 
 /* Initializes the threading system by transforming the code
@@ -296,7 +296,7 @@ thread_exit (void)
 
   /* Remove thread from all threads list, set our status to dying,
      and schedule another process.  That process will destroy us
-     when it call schedule_tail(). */
+     when it calls thread_schedule_tail(). */
   intr_disable ();
   list_remove (&thread_current()->allelem);
   thread_current ()->status = THREAD_DYING;
@@ -516,7 +516,7 @@ next_thread_to_run (void)
    After this function and its caller returns, the thread switch
    is complete. */
 void
-schedule_tail (struct thread *prev) 
+thread_schedule_tail (struct thread *prev)
 {
   struct thread *cur = running_thread ();
   
@@ -550,8 +550,8 @@ schedule_tail (struct thread *prev)
    running to some other state.  This function finds another
    thread to run and switches to it.
 
-   It's not safe to call printf() until schedule_tail() has
-   completed. */
+   It's not safe to call printf() until thread_schedule_tail()
+   has completed. */
 static void
 schedule (void) 
 {
@@ -565,7 +565,7 @@ schedule (void)
 
   if (cur != next)
     prev = switch_threads (cur, next);
-  schedule_tail (prev); 
+  thread_schedule_tail (prev);
 }
 
 /* Returns a tid to use for a new thread. */
index 709dd3a21241459ee59045f95f1cc6a57de72e9e..f8ed9a90ab0d7cf0cad855842cac8570a1e720f6 100644 (file)
@@ -42,7 +42,7 @@
        not in use, so we can always use that.  Thus, when the
        scheduler switches threads, it also changes the TSS's
        stack pointer to point to the new thread's kernel stack.
-       (The call is in schedule_tail() in thread.c.)
+       (The call is in thread_schedule_tail() in thread.c.)
 
    See [IA32-v3a] 6.2.1 "Task-State Segment (TSS)" for a
    description of the TSS.  See [IA32-v3a] 5.12.1 "Exception- or