Added code to get the consoles to be split into their own
Fixed issue where exiting a shell would not close the parent console properly Changed the way the consoles are linked to the processes by making it a pointer to the console Added all the console changes for the above Added a slow maze drawing program similar to the c64 version
This commit is contained in:
12
sysproc.c
12
sysproc.c
@ -93,12 +93,12 @@ int sys_uptime(void)
|
||||
}
|
||||
|
||||
int sys_greeting(void)
|
||||
{
|
||||
{
|
||||
cprintf("Hello again\n");
|
||||
cprintf("Using Console: %d\n", getcurrentconsoleindex());
|
||||
cprintf("Current PID: %d\n", myproc()->pid);
|
||||
cprintf("Current Parent PID: %d\n", myproc()->parent->pid);
|
||||
cprintf("Process Console: %d\n", myproc()->consoleIndex);
|
||||
//cprintf("Process Console: %d\n", myproc()->consoleptr->consoleindex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -129,11 +129,11 @@ int sys_screen(void)
|
||||
{
|
||||
struct proc *curproc = myproc();
|
||||
int result = 0;
|
||||
int consoleindex = -1;
|
||||
if ((consoleindex = newconsole()) != 0)
|
||||
struct vconsole* consoleptr = 0;
|
||||
if ((consoleptr = newconsole()) != 0)
|
||||
{
|
||||
curproc->consoleIndex = consoleindex;
|
||||
switchtoconsole(consoleindex);
|
||||
curproc->consoleptr = consoleptr;
|
||||
switchtoconsole(consoleptr);
|
||||
result = 1;
|
||||
}
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user