This repository has been archived on 2024-11-18. You can view files and clone it, but cannot push or open issues or pull requests.
2023-12-03 17:08:00 +08:00
|
|
|
#ifndef KERNEL_H
|
|
|
|
#define KERNEL_H 1
|
|
|
|
|
|
|
|
#include <types.h>
|
2023-12-13 02:24:25 +08:00
|
|
|
|
|
|
|
#ifdef __x86_64__
|
|
|
|
|
|
|
|
#include <kernel/arch/x86_64/kernel.h>
|
|
|
|
|
|
|
|
#define ISA_STRING "x86_64"
|
|
|
|
|
|
|
|
#endif
|
2023-12-03 17:08:00 +08:00
|
|
|
|
|
|
|
#define KERNEL_TODO() \
|
|
|
|
while (true) \
|
|
|
|
{ \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define simple_lock_lock(lock) \
|
|
|
|
{ \
|
|
|
|
while (lock == true) \
|
|
|
|
; \
|
|
|
|
(lock) = true; \
|
|
|
|
}
|
|
|
|
#define simple_lock_unlock(lock) (lock) = false;
|
|
|
|
|
|
|
|
extern void *kend; // 内核结束的标记
|
|
|
|
|
|
|
|
#endif
|