Keyboard buffer + getline

This commit is contained in:
2026-03-18 13:07:26 +01:00
parent f7735eb3a4
commit b77c53ae99
7 changed files with 125 additions and 8 deletions

View File

@@ -68,7 +68,7 @@ struct process_t* idle_proc;
// Never gets executed although pedicel is scheduled?
void pedicel_main(void* arg)
{
printf("\n\nWelcome to PepperOS! Pedicel speaking.\r\nNothing left to do, let's go idle!");
printf("\n\nWelcome to PepperOS! Pedicel speaking.\r\nNothing left to do, let's go idle!\r\n");
}
void idle_main(void* arg)
@@ -78,6 +78,14 @@ void idle_main(void* arg)
}
}
void thing_main(void* arg)
{
printf("What's your name, pal? ");
char name[10];
keyboard_getline(name, 10);
printf("\r\n{%s} is such a nice name!\r\n", name);
}
extern uintptr_t kheap_start;
/*
@@ -118,7 +126,7 @@ void kmain()
process_init();
idle_proc = process_create("idle", (void*)idle_main, 0);
struct process_t* pedicel = process_create("pedicel", (void*)pedicel_main, 0);
process_create("thing", thing_main, NULL);
process_display_list(processes_list);
scheduler_init();