cosmetic changes (thanks Harry Porter)
This commit is contained in:
parent
dd5a720044
commit
62bc610424
|
@ -149,7 +149,7 @@ consoleintr(int c)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case C('H'): // Backspace
|
case C('H'): // Backspace
|
||||||
case '\x7f':
|
case '\x7f': // Delete key
|
||||||
if(cons.e != cons.w){
|
if(cons.e != cons.w){
|
||||||
cons.e--;
|
cons.e--;
|
||||||
consputc(BACKSPACE);
|
consputc(BACKSPACE);
|
||||||
|
|
|
@ -171,8 +171,8 @@ freeproc(struct proc *p)
|
||||||
p->state = UNUSED;
|
p->state = UNUSED;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a user page table for a given process,
|
// Create a user page table for a given process, with no user memory,
|
||||||
// with no user memory, but with trampoline pages.
|
// but with trampoline and trapframe pages.
|
||||||
pagetable_t
|
pagetable_t
|
||||||
proc_pagetable(struct proc *p)
|
proc_pagetable(struct proc *p)
|
||||||
{
|
{
|
||||||
|
@ -193,7 +193,8 @@ proc_pagetable(struct proc *p)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// map the trapframe just below TRAMPOLINE, for trampoline.S.
|
// map the trapframe page just below the trampoline page, for
|
||||||
|
// trampoline.S.
|
||||||
if(mappages(pagetable, TRAPFRAME, PGSIZE,
|
if(mappages(pagetable, TRAPFRAME, PGSIZE,
|
||||||
(uint64)(p->trapframe), PTE_R | PTE_W) < 0){
|
(uint64)(p->trapframe), PTE_R | PTE_W) < 0){
|
||||||
uvmunmap(pagetable, TRAMPOLINE, 1, 0);
|
uvmunmap(pagetable, TRAMPOLINE, 1, 0);
|
||||||
|
|
|
@ -83,27 +83,27 @@ argstr(int n, char *buf, int max)
|
||||||
return fetchstr(addr, buf, max);
|
return fetchstr(addr, buf, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern uint64 sys_chdir(void);
|
|
||||||
extern uint64 sys_close(void);
|
|
||||||
extern uint64 sys_dup(void);
|
|
||||||
extern uint64 sys_exec(void);
|
|
||||||
extern uint64 sys_exit(void);
|
|
||||||
extern uint64 sys_fork(void);
|
extern uint64 sys_fork(void);
|
||||||
extern uint64 sys_fstat(void);
|
extern uint64 sys_exit(void);
|
||||||
extern uint64 sys_getpid(void);
|
extern uint64 sys_wait(void);
|
||||||
extern uint64 sys_kill(void);
|
|
||||||
extern uint64 sys_link(void);
|
|
||||||
extern uint64 sys_mkdir(void);
|
|
||||||
extern uint64 sys_mknod(void);
|
|
||||||
extern uint64 sys_open(void);
|
|
||||||
extern uint64 sys_pipe(void);
|
extern uint64 sys_pipe(void);
|
||||||
extern uint64 sys_read(void);
|
extern uint64 sys_read(void);
|
||||||
|
extern uint64 sys_kill(void);
|
||||||
|
extern uint64 sys_exec(void);
|
||||||
|
extern uint64 sys_fstat(void);
|
||||||
|
extern uint64 sys_chdir(void);
|
||||||
|
extern uint64 sys_dup(void);
|
||||||
|
extern uint64 sys_getpid(void);
|
||||||
extern uint64 sys_sbrk(void);
|
extern uint64 sys_sbrk(void);
|
||||||
extern uint64 sys_sleep(void);
|
extern uint64 sys_sleep(void);
|
||||||
extern uint64 sys_unlink(void);
|
|
||||||
extern uint64 sys_wait(void);
|
|
||||||
extern uint64 sys_write(void);
|
|
||||||
extern uint64 sys_uptime(void);
|
extern uint64 sys_uptime(void);
|
||||||
|
extern uint64 sys_open(void);
|
||||||
|
extern uint64 sys_write(void);
|
||||||
|
extern uint64 sys_mknod(void);
|
||||||
|
extern uint64 sys_unlink(void);
|
||||||
|
extern uint64 sys_link(void);
|
||||||
|
extern uint64 sys_mkdir(void);
|
||||||
|
extern uint64 sys_close(void);
|
||||||
|
|
||||||
static uint64 (*syscalls[])(void) = {
|
static uint64 (*syscalls[])(void) = {
|
||||||
[SYS_fork] sys_fork,
|
[SYS_fork] sys_fork,
|
||||||
|
|
Loading…
Reference in a new issue