From ab4cedb5930cb21f0a4810f64be0ab6cfca026f3 Mon Sep 17 00:00:00 2001 From: rtm Date: Fri, 31 Aug 2007 19:55:27 +0000 Subject: [PATCH] continuous quality management --- asm.h | 2 +- spinlock.c | 4 ++-- x86.h | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/asm.h b/asm.h index ddea060..0c052db 100644 --- a/asm.h +++ b/asm.h @@ -1,5 +1,5 @@ // -// macros to create x86 segments from assembler +// assembler macros to create x86 segments // #define SEG_NULLASM \ diff --git a/spinlock.c b/spinlock.c index 236235c..891f72c 100644 --- a/spinlock.c +++ b/spinlock.c @@ -20,8 +20,8 @@ initlock(struct spinlock *lock, char *name) // Acquire the lock. // Loops (spins) until the lock is acquired. -// (Because contention is handled by spinning, -// must not go to sleep holding any locks.) +// Holding a lock for a long time may cause +// other CPUs to waste time spinning to acquire it. void acquire(struct spinlock *lock) { diff --git a/x86.h b/x86.h index 1ef79cb..2ac51e5 100644 --- a/x86.h +++ b/x86.h @@ -1,5 +1,4 @@ -// Special assembly routines to access x86-specific -// hardware instructions. +// Routines to let C code use special x86 instructions. static inline uchar inb(ushort port) @@ -131,7 +130,8 @@ sti(void) asm volatile("sti"); } -// Layout of the trap frame on the stack upon entry to trap. +// Layout of the trap frame built on the stack by the +// hardware and by trapasm.S, and passed to trap(). struct trapframe { // registers as pushed by pusha uint edi;