Kernel processes / multitasking
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
@ -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_
|
||||
|
Reference in New Issue
Block a user