xref: /xv6-public/spinlock.h (revision c2f354e4)
1 // Mutual exclusion lock.
2 struct spinlock {
3   uint locked;   // Is the lock held?
4 
5   // For debugging:
6   char *name;    // Name of lock.
7   int  cpu;      // The number of the cpu holding the lock.
8   uint pcs[10];  // The call stack (an array of program counters)
9                  // that locked the lock.
10 };
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 // Blank page.
55