[Add] laos base boot
This commit is contained in:
23
laos/include/spinlock.h
Normal file
23
laos/include/spinlock.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "latype.h"
|
||||
|
||||
#ifndef SPINLOCK_H__
|
||||
#define SPINLOCK_H__
|
||||
|
||||
struct spinlock {
|
||||
uint locked;
|
||||
|
||||
// debugging
|
||||
char *name;
|
||||
struct cpu *cpu;
|
||||
};
|
||||
|
||||
void initlock(struct spinlock *lck, char *name);
|
||||
|
||||
void acquire(struct spinlock *lck);
|
||||
void release(struct spinlock *lck);
|
||||
|
||||
int holding(struct spinlock *lck);
|
||||
void push_off();
|
||||
void pop_off();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user