Began rewrite

This commit is contained in:
2025-02-16 16:27:46 +01:00
parent 295e3d9c18
commit 7d41cf45ed
82 changed files with 99 additions and 3028 deletions
+24
View File
@@ -0,0 +1,24 @@
#ifndef _KERNEL_H
#define _KERNEL_H
/*
* Attribute definitions
*/
#define __align(_b) __attribute__((aligned(_b)))
#define __depricated __attribute__((depricated))
#define __packed __attribute__((packed))
#define __noreturn __attribute__((noreturn))
#define __const __attribute__((const))
#define __pure __attribute__((pure))
#define __inline __attribute__((always_inline))
#define __no_inline __attribute__((never_inline))
#define __section(_s) __attribute__((section(_s)))
#define __cold __attribute__((cold))
#define __hot __attribute__((hot))
#define __naked __attribute__((naked))
/*
* Utility macros
*/
#define sizeof_array(_a) ()
#endif
-22
View File
@@ -1,22 +0,0 @@
#ifndef _STDINT_H
#define _STDINT_H
#define NULL ((void*)0)
// Naitive size
typedef unsigned int size_t;
typedef signed int ssize_t;
// Signed ints
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef signed long long int64_t;
// Unsigned ints
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
#endif
+9
View File
@@ -0,0 +1,9 @@
#ifndef _TTY_H
#define _TTY_H
int tty_init(void);
int tty_write(char* buf, size_t len);
int tty_putc(char c);
int tty_puts(char* s);
#endif