2011-08-29 23:18:40 +02:00
|
|
|
// Mutual exclusion lock.
|
2006-07-12 11:10:25 +02:00
|
|
|
struct spinlock {
|
2024-06-15 16:55:06 +02:00
|
|
|
u32 locked; // Is the lock held?
|
2016-08-25 15:13:00 +02:00
|
|
|
|
2006-09-07 16:12:30 +02:00
|
|
|
// For debugging:
|
2024-06-15 16:55:06 +02:00
|
|
|
char *name; // Name of lock.
|
|
|
|
struct cpu *cpu; // The cpu holding the lock.
|
2006-07-12 11:10:25 +02:00
|
|
|
};
|