spinlock.h 311 Bytes
Newer Older
Wilke Pierre's avatar
Wilke Pierre committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef SPINLOCK_H
#define SPINLOCK_H

// 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.
  uint64 pc;
  int pid;
  uint n;
  uint nts;
};

Wilke Pierre's avatar
TP0    
Wilke Pierre committed
17
18
void dump_locks();

Wilke Pierre's avatar
Wilke Pierre committed
19
#endif