summaryrefslogtreecommitdiff
path: root/spinlock.c
diff options
context:
space:
mode:
authorrtm <rtm>2007-08-31 19:55:27 +0000
committerrtm <rtm>2007-08-31 19:55:27 +0000
commitab4cedb5930cb21f0a4810f64be0ab6cfca026f3 (patch)
tree212ebf675a8a3b3dd0914f5ab8cbf0941dc05c02 /spinlock.c
parentef2185247d468309a375b0e16d73e8723cdf29a0 (diff)
downloadxv6-labs-ab4cedb5930cb21f0a4810f64be0ab6cfca026f3.tar.gz
xv6-labs-ab4cedb5930cb21f0a4810f64be0ab6cfca026f3.tar.bz2
xv6-labs-ab4cedb5930cb21f0a4810f64be0ab6cfca026f3.zip
continuous quality management
Diffstat (limited to 'spinlock.c')
-rw-r--r--spinlock.c4
1 files changed, 2 insertions, 2 deletions
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)
{