xv6-riscv-kernel/kernel/spinlock.h

13 lines
231 B
C
Raw Normal View History

#pragma once
#include "types.h"
/** Mutual exclusion spin lock */
struct spinlock {
2024-06-15 16:55:06 +02:00
u32 locked; // Is the lock held?
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.
};