[lib][console] move the state of the console into an object
This will allow in the future multiple instances of it to be active at at a time. Place the current console in a new TLS slot per thread so threads created as a side effect of console commands can properly run commands.
This commit is contained in:
@@ -10,7 +10,13 @@
|
||||
#include <lib/console.h>
|
||||
|
||||
static void shell_entry(const struct app_descriptor *app, void *args) {
|
||||
console_start();
|
||||
console_t *con = console_create(true);
|
||||
if (!con)
|
||||
return;
|
||||
|
||||
console_start(con);
|
||||
|
||||
// TODO: destroy console and free resources
|
||||
}
|
||||
|
||||
APP_START(shell)
|
||||
|
||||
Reference in New Issue
Block a user