xv6

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 2715cd35921ee748154ebdce04ed84a1e543338f
parent dca5b5ca2e3687f27ebf589fe3855966932840d8
Author: rsc <rsc>
Date:   Fri, 10 Aug 2007 17:17:57 +0000

and spinlock

Diffstat:
Mspinlock.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/spinlock.c b/spinlock.c @@ -22,8 +22,10 @@ initlock(struct spinlock *lock, char *name) void getcallerpcs(void *v, uint pcs[]) { - uint *ebp = (uint*)v - 2; + uint *ebp; int i; + + ebp = (uint*)v - 2; for(i = 0; i < 10; i++){ if(ebp == 0 || ebp == (uint*)0xffffffff) break; @@ -88,3 +90,4 @@ holding(struct spinlock *lock) { return lock->locked && lock->cpu == cpu() + 10; } +