kernel-dev/include/kernel/kernel.h

68 lines
1.1 KiB
C
Raw Permalink Normal View History

#ifndef KERNEL_H
#define KERNEL_H 1
#include <types.h>
#include <kernel/interrupt/procs.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"
#endif
2023-12-13 02:24:25 +08:00
#ifndef BUILD_ID
#define BUILD_ID 0
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