feat: initial booting kernel, copy libc stuff from myke

This commit is contained in:
2023-03-22 21:02:22 +01:00
parent 591b6d61c5
commit 61fb439d72
26 changed files with 791 additions and 220 deletions

View File

@@ -0,0 +1,37 @@
//
// Created by rick on 10-03-21.
//
#ifndef NEW_KERNEL_STDLIB_H
#define NEW_KERNEL_STDLIB_H
#include <stdint.h>
#include <stddef.h>
void __attribute__((__noreturn__)) abort();
int atexit(void (*)(void));
int atoi(const char *);
char *itoa(uint32_t value, char *buffer, int base);
char *getenv(const char *);
int abs(int val);
long labs(long val);
long long llabs(long long val);
void qsort(void *base, size_t num, size_t size, int (*compar)(const void *, const void *));
long strtol(const char *nptr, char **endptr, int base);
void *malloc(size_t size);
void free(void *ptr);
void *calloc(size_t nmemb, size_t size);
void *realloc(void *ptr, size_t size);
void *reallocarray(void *ptr, size_t nmemb, size_t size);
#endif //NEW_KERNEL_STDLIB_H