Comments.
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 29 Sep 2004 01:04:09 +0000 (01:04 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 29 Sep 2004 01:04:09 +0000 (01:04 +0000)
src/threads/interrupt.h
src/threads/palloc.h
src/threads/switch.h
src/threads/synch.c
src/threads/synch.h

index adb7fa99b4a424e116914551c4edb0f3d2d30d20..d54b7ef0893ff4caff7af5883d47b7c123fcd0d8 100644 (file)
@@ -41,7 +41,7 @@ struct intr_frame
 
     /* Pushed by the CPU.
        These are the interrupted task's saved registers. */
 
     /* Pushed by the CPU.
        These are the interrupted task's saved registers. */
-    void (*eip) (void);         /* Current or next instruction. */
+    void (*eip) (void);         /* Next instruction to execute. */
     uint16_t cs, :16;           /* Code segment for eip. */
     uint32_t eflags;            /* Saved CPU flags. */
     void *esp;                  /* Saved stack pointer. */
     uint16_t cs, :16;           /* Code segment for eip. */
     uint32_t eflags;            /* Saved CPU flags. */
     void *esp;                  /* Saved stack pointer. */
index ba6aa741a954baf17e34cadc6a769974ca233dab..2d41cf6d52e186633f014b7c0a5b482c08fc33b6 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <stddef.h>
 
 
 #include <stddef.h>
 
+/* How to allocate pages. */
 enum palloc_flags
   {
     PAL_ASSERT = 001,           /* Panic on failure. */
 enum palloc_flags
   {
     PAL_ASSERT = 001,           /* Panic on failure. */
index 07b805e963d67f642f26e714d91462ec43389a83..084a79454936a360cc548606d9ba6d8ce9940b59 100644 (file)
@@ -19,6 +19,7 @@ struct switch_threads_frame
    NEXT's context. */
 struct thread *switch_threads (struct thread *cur, struct thread *next);
 
    NEXT's context. */
 struct thread *switch_threads (struct thread *cur, struct thread *next);
 
+/* Stack frame for switch_entry(). */
 struct switch_entry_frame
   {
     void (*eip) (void);
 struct switch_entry_frame
   {
     void (*eip) (void);
index 85af57d63ac8c0f59f8b254c0d4db46f495d392b..a892454c8e9adf186c8189173d46c635b15e13e4 100644 (file)
@@ -250,7 +250,7 @@ cond_init (struct condition *cond, const char *name)
 }
 
 /* Atomically releases LOCK and waits for COND to be signaled by
 }
 
 /* Atomically releases LOCK and waits for COND to be signaled by
-   some other piece of code.  After COND is signalled, LOCK is
+   some other piece of code.  After COND is signaled, LOCK is
    reacquired before returning.  LOCK must be held before calling
    this function.
 
    reacquired before returning.  LOCK must be held before calling
    this function.
 
@@ -261,7 +261,7 @@ cond_init (struct condition *cond, const char *name)
    again.
 
    A given condition variable is associated with only a single
    again.
 
    A given condition variable is associated with only a single
-   lock, but one lock may be be associated with any number of
+   lock, but one lock may be associated with any number of
    condition variables.  That is, there is a one-to-many mapping
    from locks to condition variables.
 
    condition variables.  That is, there is a one-to-many mapping
    from locks to condition variables.
 
index ad8423891bad260215a77d0274dddfd75c960962..c13f95d8d429a762843824e8c4e70fc1f6d4a799 100644 (file)
@@ -12,7 +12,7 @@ struct semaphore
     struct list waiters;        /* List of waiting threads. */
   };
 
     struct list waiters;        /* List of waiting threads. */
   };
 
-void sema_init (struct semaphore *, unsigned value, const char *);
+void sema_init (struct semaphore *, unsigned value, const char *name);
 void sema_down (struct semaphore *);
 void sema_up (struct semaphore *);
 const char *sema_name (const struct semaphore *);
 void sema_down (struct semaphore *);
 void sema_up (struct semaphore *);
 const char *sema_name (const struct semaphore *);
@@ -25,7 +25,7 @@ struct lock
     struct semaphore semaphore; /* Binary semaphore controlling access. */
   };
 
     struct semaphore semaphore; /* Binary semaphore controlling access. */
   };
 
-void lock_init (struct lock *, const char *);
+void lock_init (struct lock *, const char *name);
 void lock_acquire (struct lock *);
 void lock_release (struct lock *);
 bool lock_held_by_current_thread (const struct lock *);
 void lock_acquire (struct lock *);
 void lock_release (struct lock *);
 bool lock_held_by_current_thread (const struct lock *);
@@ -38,7 +38,7 @@ struct condition
     struct list waiters;        /* List of waiting threads. */
   };
 
     struct list waiters;        /* List of waiting threads. */
   };
 
-void cond_init (struct condition *, const char *);
+void cond_init (struct condition *, const char *name);
 void cond_wait (struct condition *, struct lock *);
 void cond_signal (struct condition *, struct lock *);
 void cond_broadcast (struct condition *, struct lock *);
 void cond_wait (struct condition *, struct lock *);
 void cond_signal (struct condition *, struct lock *);
 void cond_broadcast (struct condition *, struct lock *);