Kernel processes / multitasking

This commit is contained in:
2025-08-30 23:47:25 +02:00
parent 60a530b900
commit 0273330cf4
22 changed files with 381 additions and 56 deletions

View File

@ -7,11 +7,10 @@
Term TERM;
void term_init(void) {
spinlock_init(&TERM.spinlock);
void term_doinit(void *addr) {
TERM.ftctx = flanterm_fb_init(
NULL, NULL,
BOOT_INFO.fb->address,
addr,
BOOT_INFO.fb->width,
BOOT_INFO.fb->height,
BOOT_INFO.fb->pitch,
@ -31,6 +30,11 @@ void term_init(void) {
);
}
void term_init(void *addr) {
spinlock_init(&TERM.spinlock);
term_doinit(addr);
}
void term_write_unsafe(const char *s, size_t len) {
flanterm_write(TERM.ftctx, s, len);
}

View File

@ -12,7 +12,7 @@ typedef struct {
extern Term TERM;
void term_init(void);
void term_init(void *addr);
void term_write_unsafe(const char *s, size_t len);
#endif // TERM_TERM_H_