metaverse-dev/include/kernel/kernel.h

66 lines
1.0 KiB
C
Raw Normal View History

#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>
2024-01-14 21:52:10 +08:00
#define ISA_NAME "x86_64"
2023-12-13 02:24:25 +08:00
#endif
/**
* @name KERNEL_TODO
*
*
*/
#define KERNEL_TODO() \
while (true) \
{ \
}
/**
* @name simple_lock
*
*
*
* ```c
* #define simple_lock_lock(lock)
* ```
*
*
*
* ```c
* #define simple_lock_unlock(lock)
* ```
*
*
*/
#define simple_lock_lock(lock) \
{ \
while (lock == true) \
; \
(lock) = true; \
}
#define simple_lock_unlock(lock) (lock) = false;
/**
* @name kmain_rust
*
* rust内核主程序
*/
extern void kmain_rust();
/**
* @name kend
*
*
*
*
*/
extern void *kend;
#endif