mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-03 18:22:22 +00:00
Began rewrite
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user