规范符号命名,同步函数的描述,移除不必要的宏

This commit is contained in:
pointer-to-bios 2024-02-12 02:59:33 +08:00
parent 13d76c4e6a
commit d14187ea96
4 changed files with 4 additions and 11 deletions

View File

@ -2,6 +2,7 @@
#define X86_64_INTERRUPT_H 1
#include <types.h>
#include <utils.h>
typedef struct __gate_descriptor_t
{
@ -11,7 +12,7 @@ typedef struct __gate_descriptor_t
u16 offset_23;
u32 offset_4567;
u32 reserved;
} gate_descriptor_t;
} DISALIGNED gate_descriptor_t;
// interrupt stack table每个表项都指向tss
// 需要加载寄存器IA32_INTERRUPT_SSP_TABLE

View File

@ -15,7 +15,7 @@ typedef enum __memm_page_size
extern u64 PML4[512];
#define MEMM_PAGE_TABLE_FLAGS_AREA ((u64)0xfff)
#define MEMM_PAGE_TABLE_FLAGS_MASK ((u64)0xfff)
/* 页对齐掩码 */
#define MEMM_4K_ALIGN_MASK ((u64)0xfff)

View File

@ -33,7 +33,7 @@ bool lst_remove(lst_iterator_t *lst, usize left, usize right, bool force);
/*
`lst`线[left,right)
force=true时忽略已经存在于`lst`线
force=false时若有存在于`lst`线线falsetrue
force=false时若有存在于`lst`线线falsetrue
*/
bool lst_add(lst_iterator_t *lst, usize left, usize right, bool force);

View File

@ -3,14 +3,6 @@
#include <types.h>
#define UTILS_BIT_GET(byte, bit) ((byte) & (1 << (bit)))
#define UTILS_BIT_SET(byte, bit) ((byte) |= (1 << (bit)));
#define UTILS_BIT_RESET(byte, bit) ((byte) &= ~(1 << (bit)));
#define UTILS_BITMAP_GET(map, bit) (((u8 *)(map))[bit / 8] & (1 << ((bit) % 8)))
#define UTILS_BITMAP_SET(map, bit) (((u8 *)(map))[bit / 8] |= (1 << ((bit) % 8)));
#define UTILS_BITMAP_RESET(map, bit) (((u8 *)(map))[bit / 8] &= ~(1 << ((bit) % 8)));
#define DISALIGNED __attribute__((packed))
#endif