diff options
author | rsc <rsc> | 2006-09-06 17:27:19 +0000 |
---|---|---|
committer | rsc <rsc> | 2006-09-06 17:27:19 +0000 |
commit | 9e9bcaf143bf8507e947f9934371744c3d50a8ea (patch) | |
tree | b63a03929569f34ade9a940ef1416586346b8d30 /spinlock.c | |
parent | 03b6376f56074cd1dcbb1b35639e303c3a8a0181 (diff) | |
download | xv6-labs-9e9bcaf143bf8507e947f9934371744c3d50a8ea.tar.gz xv6-labs-9e9bcaf143bf8507e947f9934371744c3d50a8ea.tar.bz2 xv6-labs-9e9bcaf143bf8507e947f9934371744c3d50a8ea.zip |
standardize various * conventions
Diffstat (limited to 'spinlock.c')
-rw-r--r-- | spinlock.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -29,7 +29,7 @@ getcallerpcs(void *v, uint pcs[]) } void -acquire(struct spinlock * lock) +acquire(struct spinlock *lock) { if(holding(lock)) panic("acquire"); @@ -37,7 +37,7 @@ acquire(struct spinlock * lock) if(cpus[cpu()].nlock == 0) cli(); cpus[cpu()].nlock++; - + while(cmpxchg(0, 1, &lock->locked) == 1) ; cpuid(0, 0, 0, 0, 0); // memory barrier @@ -46,7 +46,7 @@ acquire(struct spinlock * lock) } void -release(struct spinlock * lock) +release(struct spinlock *lock) { if(!holding(lock)) |