summaryrefslogtreecommitdiff
path: root/kernel/spinlock.h
blob: 9bac216ab1d06616b78030123e5e7e62bb6eced6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Mutual exclusion lock.
struct spinlock {
  uint locked;       // Is the lock held?

  // For debugging:
  char *name;        // Name of lock.
  struct cpu *cpu;   // The cpu holding the lock.
#ifdef LAB_LOCK
  int nts;
  int n;
#endif
};