diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-11-09 08:19:28 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-11-09 08:19:28 +0100 |
commit | b18a6413975a0a8d06e6d310072a0ff90b1ed541 (patch) | |
tree | f147cffbc9767014b6409ebda9a21f957689bc1b /sys/src/9/port/proc.c | |
parent | 1ffcdbab88aca698161b34096934e196370b3a21 (diff) |
kernel: remove implicit Proc* argument from procctl()
procctl() is always called with up and it would not
work correctly if passed a different process, so
remove the Proc* argument and use up directly.
Diffstat (limited to 'sys/src/9/port/proc.c')
-rw-r--r-- | sys/src/9/port/proc.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sys/src/9/port/proc.c b/sys/src/9/port/proc.c index 9a9649d9f..0f5f6f992 100644 --- a/sys/src/9/port/proc.c +++ b/sys/src/9/port/proc.c @@ -1420,12 +1420,12 @@ kproc(char *name, void (*func)(void *), void *arg) * reasoning. */ void -procctl(Proc *p) +procctl(void) { char *state; ulong s; - switch(p->procctl) { + switch(up->procctl) { case Proc_exitbig: spllo(); pprint("Killed: Insufficient physical memory\n"); @@ -1436,26 +1436,26 @@ procctl(Proc *p) pexit("Killed", 1); case Proc_traceme: - if(p->nnote == 0) + if(up->nnote == 0) return; /* No break */ case Proc_stopme: - p->procctl = 0; - state = p->psstate; - p->psstate = "Stopped"; + up->procctl = 0; + state = up->psstate; + up->psstate = "Stopped"; /* free a waiting debugger */ s = spllo(); - qlock(&p->debug); - if(p->pdbg != nil) { - wakeup(&p->pdbg->sleep); - p->pdbg = nil; + qlock(&up->debug); + if(up->pdbg != nil) { + wakeup(&up->pdbg->sleep); + up->pdbg = nil; } - qunlock(&p->debug); + qunlock(&up->debug); splhi(); - p->state = Stopped; + up->state = Stopped; sched(); - p->psstate = state; + up->psstate = state; splx(s); return; } |