summaryrefslogtreecommitdiff
path: root/spinlock.c
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2016-09-15 12:56:17 -0400
committerRobert Morris <[email protected]>2016-09-15 12:56:17 -0400
commitd6dc5bcb2da252ea01937a7788b02ce849be2d3c (patch)
tree5f4c44620144e694f1fd31c731107d390ab4f858 /spinlock.c
parentaeaa308943a14acfaab00f0d9af8424d21a991ae (diff)
parent33188666da819c3f8e58f6ab5bc993f490644d4a (diff)
downloadxv6-labs-d6dc5bcb2da252ea01937a7788b02ce849be2d3c.tar.gz
xv6-labs-d6dc5bcb2da252ea01937a7788b02ce849be2d3c.tar.bz2
xv6-labs-d6dc5bcb2da252ea01937a7788b02ce849be2d3c.zip
Merge branch 'master' of g.csail.mit.edu:xv6-dev
Diffstat (limited to 'spinlock.c')
-rw-r--r--spinlock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/spinlock.c b/spinlock.c
index 2f0e873..942d93d 100644
--- a/spinlock.c
+++ b/spinlock.c
@@ -61,7 +61,7 @@ release(struct spinlock *lk)
// Release the lock, equivalent to lk->locked = 0.
// This code can't use a C assignment, since it might
- // not be atomic.
+ // not be atomic. A real OS would use C atomics here.
asm volatile("movl $0, %0" : "+m" (lk->locked) : );
popcli();