feat: reformatted code base to be more standard
This commit is contained in:
22
include/myke/libk/kprint.h
Normal file
22
include/myke/libk/kprint.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Created by rick on 28-01-21.
|
||||
//
|
||||
|
||||
#ifndef NEW_KERNEL_KPRINT_H
|
||||
#define NEW_KERNEL_KPRINT_H
|
||||
|
||||
#endif //NEW_KERNEL_KPRINT_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
typedef void (*kprint_handler)(const char *);
|
||||
|
||||
void kprint_register(kprint_handler);
|
||||
|
||||
void kprint(const char *msg);
|
||||
|
||||
void kprint_sync(const char* msg);
|
||||
|
||||
void kprint_init();
|
||||
|
||||
void kprint_start_task();
|
||||
23
include/myke/libk/libk.h
Normal file
23
include/myke/libk/libk.h
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Created by rick on 02-02-21.
|
||||
//
|
||||
|
||||
#ifndef NEW_KERNEL_LIBK_H
|
||||
#define NEW_KERNEL_LIBK_H
|
||||
#include <myke/attributes.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
extern void* _kernel_start;
|
||||
extern void* _kernel_end;
|
||||
#define kernel_start ((uint32_t)(&_kernel_start))
|
||||
#define kernel_end ((uint32_t)(&_kernel_end))
|
||||
|
||||
bool k_addr_in_kspace(void *addr);
|
||||
|
||||
void k_wait_for_interrupt();
|
||||
|
||||
void noreturn k_panics(const char *msg);
|
||||
|
||||
void noreturn k_panic();
|
||||
|
||||
#endif //NEW_KERNEL_LIBK_H
|
||||
23
include/myke/libk/syscall.h
Normal file
23
include/myke/libk/syscall.h
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Created by rick on 22-02-21.
|
||||
//
|
||||
|
||||
#ifndef NEW_KERNEL_SYSCALL_H
|
||||
#define NEW_KERNEL_SYSCALL_H
|
||||
#include <sys/types.h>
|
||||
#include <myke/attributes.h>
|
||||
|
||||
#define SYSCALL_START_SCHEDULER 0x01
|
||||
#define SYSCALL_YIELD_JOB 0x02
|
||||
#define SYSCALL_YIELD_IRQ 0x03
|
||||
#define SYSCALL_SUSPEND 0x04
|
||||
|
||||
void noreturn syscall_start_scheduler();
|
||||
|
||||
void syscall_yield_job();
|
||||
|
||||
void syscall_yield_irq(uint16_t irq);
|
||||
|
||||
void syscall_job_suspend();
|
||||
|
||||
#endif //NEW_KERNEL_SYSCALL_H
|
||||
Reference in New Issue
Block a user