summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/proc.c b/proc.c
index 85f3f17..751d886 100644
--- a/proc.c
+++ b/proc.c
@@ -53,11 +53,11 @@ found:
return 0;
}
sp = p->kstack + KSTACKSIZE;
-
+
// Leave room for trap frame.
sp -= sizeof *p->tf;
p->tf = (struct trapframe*)sp;
-
+
// Set up new context to start executing at forkret,
// which returns to trapret.
sp -= 4;
@@ -78,7 +78,7 @@ userinit(void)
{
struct proc *p;
extern char _binary_initcode_start[], _binary_initcode_size[];
-
+
acquire(&ptable.lock);
p = allocproc();
@@ -110,7 +110,7 @@ int
growproc(int n)
{
uint sz;
-
+
sz = proc->sz;
if(n > 0){
if((sz = allocuvm(proc->pgdir, sz, sz + n)) == 0)
@@ -162,13 +162,13 @@ fork(void)
np->cwd = idup(proc->cwd);
safestrcpy(np->name, proc->name, sizeof(proc->name));
-
+
pid = np->pid;
np->state = RUNNABLE;
release(&ptable.lock);
-
+
return pid;
}
@@ -342,13 +342,13 @@ forkret(void)
if (first) {
// Some initialization functions must be run in the context
- // of a regular process (e.g., they call sleep), and thus cannot
+ // of a regular process (e.g., they call sleep), and thus cannot
// be run from main().
first = 0;
iinit(ROOTDEV);
initlog(ROOTDEV);
}
-
+
// Return to "caller", actually trapret (see allocproc).
}
@@ -453,7 +453,7 @@ procdump(void)
struct proc *p;
char *state;
uint pc[10];
-
+
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
if(p->state == UNUSED)
continue;