From b0562b2f0ca7f76968aeb82f113930c5cc82580e Mon Sep 17 00:00:00 2001 From: Aren Elchinyan Date: Tue, 14 Jan 2025 12:54:20 +0300 Subject: [PATCH] Kstdint removed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit А нахуя просили то --- kernel/arch/amd64/idt.c | 2 +- kernel/arch/amd64/paging.c | 2 +- kernel/arch/amd64/serial.c | 2 +- kernel/cpio.c | 2 +- kernel/include/kasm.h | 2 +- kernel/include/khal.h | 2 +- kernel/include/kstdint.h | 20 -------------------- kernel/kernel.c | 2 +- kernel/klibc/printf.c | 2 +- kernel/multiboot2.c | 2 +- 10 files changed, 9 insertions(+), 29 deletions(-) delete mode 100644 kernel/include/kstdint.h diff --git a/kernel/arch/amd64/idt.c b/kernel/arch/amd64/idt.c index ecef2de..1c09365 100644 --- a/kernel/arch/amd64/idt.c +++ b/kernel/arch/amd64/idt.c @@ -1,4 +1,4 @@ -#include "kstdint.h" +#include // From https://wiki.osdev.org/Interrupt_Descriptor_Table#Structure_on_x86-64 struct idt_64 { diff --git a/kernel/arch/amd64/paging.c b/kernel/arch/amd64/paging.c index f36bb88..77831f9 100644 --- a/kernel/arch/amd64/paging.c +++ b/kernel/arch/amd64/paging.c @@ -1,4 +1,4 @@ -#include "kstdint.h" +#include uint64_t paging_main[3][512] __attribute__((aligned(4096))) = { 0 }; diff --git a/kernel/arch/amd64/serial.c b/kernel/arch/amd64/serial.c index 6e9a6cc..bb7ff4b 100644 --- a/kernel/arch/amd64/serial.c +++ b/kernel/arch/amd64/serial.c @@ -1,5 +1,5 @@ #include "kasm.h" -#include "kstdint.h" +#include void serial_write_byte(uint8_t byte) { // Wait until the transmit holding register is empty diff --git a/kernel/cpio.c b/kernel/cpio.c index c270444..b64f9c7 100644 --- a/kernel/cpio.c +++ b/kernel/cpio.c @@ -1,4 +1,4 @@ -#include "kstdint.h" +#include // We need memory manager and kernel lib first #if 0 diff --git a/kernel/include/kasm.h b/kernel/include/kasm.h index 85dbd01..6a97ed0 100644 --- a/kernel/include/kasm.h +++ b/kernel/include/kasm.h @@ -1,7 +1,7 @@ #ifndef __K_ASM #define __K_ASM -#include "kstdint.h" +#include #if defined(__x86_64__) static inline void outb(uint16_t port, uint8_t val) { diff --git a/kernel/include/khal.h b/kernel/include/khal.h index 4539746..5cc0f4e 100644 --- a/kernel/include/khal.h +++ b/kernel/include/khal.h @@ -2,7 +2,7 @@ #define __K_HAL #include "kasm.h" -#include "kstdint.h" +#include #if defined(__x86_64__) diff --git a/kernel/include/kstdint.h b/kernel/include/kstdint.h deleted file mode 100644 index 33afcfe..0000000 --- a/kernel/include/kstdint.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __K_STDINT -#define __K_STDINT - -#include - -// deprecate this, #include from OS instead - -// typedef char int8_t; -// typedef short int16_t; -// typedef int int32_t; -// typedef long long int64_t; - -// typedef unsigned char uint8_t; -// typedef unsigned short uint16_t; -// typedef unsigned int uint32_t; -// typedef unsigned long long uint64_t; - -// typedef uint64_t uintptr_t; - -#endif \ No newline at end of file diff --git a/kernel/kernel.c b/kernel/kernel.c index 4402c7a..b8bc1b1 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -1,5 +1,5 @@ #include "khal.h" -#include "kstdint.h" +#include #include "kstring.h" #include "sys/panic.h" diff --git a/kernel/klibc/printf.c b/kernel/klibc/printf.c index f239ce9..f49160c 100644 --- a/kernel/klibc/printf.c +++ b/kernel/klibc/printf.c @@ -1,5 +1,5 @@ #include "khal.h" -#include "kstdint.h" +#include #include static char *itoa(uint64_t value, char *buf, uint8_t base) { diff --git a/kernel/multiboot2.c b/kernel/multiboot2.c index 6c72110..9a50fd0 100644 --- a/kernel/multiboot2.c +++ b/kernel/multiboot2.c @@ -1,5 +1,5 @@ #include "khal.h" -#include "kstdint.h" +#include #include "kstdlib.h" #include <3rd/multiboot2.h>