xv6-65oo2/spinlock.h

55 lines
368 B
C
Raw Normal View History

2006-09-07 14:12:30 +00:00
// Mutual exclusion lock.
struct spinlock {
2006-09-07 14:12:30 +00:00
uint locked; // Is the lock held?
// For debugging:
char *name; // Name of lock.
int cpu; // The number of the cpu holding the lock.
uint pcs[10]; // The call stack (an array of program counters)
// that locked the lock.
};
// Blank page.