annotate src/spinlock.h @ 173:7c200a8328fa
fix user malloc and spinlock redefinition
author |
kono |
date |
Fri, 17 Jan 2020 14:30:07 +0900 |
parents |
83c23a36980d |
children |
|
rev |
line source |
0
|
1 // Mutual exclusion lock.
|
173
|
2 #ifndef SPINLOCK_H
|
0
|
3 struct spinlock {
|
|
4 uint locked; // Is the lock held?
|
|
5
|
|
6 // For debugging:
|
|
7 char *name; // Name of lock.
|
|
8 struct cpu *cpu; // The cpu holding the lock.
|
|
9 uint pcs[10]; // The call stack (an array of program counters)
|
|
10 // that locked the lock.
|
|
11 };
|
173
|
12 #endif // SPINLOCK_H
|
|
13 #define SPINLOCK_H
|