Skip to content

Commit

Permalink
and spinlock
Browse files Browse the repository at this point in the history
  • Loading branch information
rsc committed Aug 10, 2007
1 parent dca5b5c commit 2715cd3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spinlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -88,3 +90,4 @@ holding(struct spinlock *lock)
{
return lock->locked && lock->cpu == cpu() + 10;
}

0 comments on commit 2715cd3

Please sign in to comment.