vga now working with term and shell program
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "drivers/serial/serial.h"
|
||||
#include "lib/memory.h"
|
||||
#include "lib/ringbuf.h"
|
||||
|
||||
@@ -25,11 +26,12 @@ typedef struct registers {
|
||||
|
||||
static int32_t sys_exit(int status) {
|
||||
process_t* task = current_task();
|
||||
task->state = STATE_ZOMBIE;
|
||||
task->exit_status = status;
|
||||
if (task->waiting) {
|
||||
wake(task->waiting);
|
||||
}
|
||||
task->state = STATE_DEAD;
|
||||
// task->exit_status = status;
|
||||
// if (task->waiting) {
|
||||
// wake(task->waiting);
|
||||
// }
|
||||
kprintf("task %d exited with status %d\n", task->pid, status);
|
||||
exit();
|
||||
return 0;
|
||||
}
|
||||
@@ -212,6 +214,7 @@ static int32_t sys_exec(registers_t* regs, const char* prgm) {
|
||||
regs->eip = eip;
|
||||
regs->useresp = (uint32_t)u_esp;
|
||||
|
||||
print_serial("returning from exec\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -253,7 +256,7 @@ static int32_t sys_mmap(int fd) {
|
||||
|
||||
if (!(file->node->flags & VFS_CHARDEVICE)) return 0;
|
||||
|
||||
uint32_t map_vaddr = 0x3FF00000;
|
||||
uint32_t map_vaddr = 0x20000000;
|
||||
return file->node->mmap(file->node, map_vaddr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user