[Add] laos base boot

This commit is contained in:
bLueriVerLHR
2023-05-21 00:48:04 +08:00
parent 5d31bf294c
commit 029a8823f4
34 changed files with 927 additions and 18 deletions

23
laos/include/spinlock.h Normal file
View 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