More consistent use of _exits and exits

in place of _exit and exit.
This commit is contained in:
rsc 2004-08-11 01:56:35 +00:00
parent bf00efba2d
commit 73bef9b76b
3 changed files with 6 additions and 6 deletions

View file

@ -61,7 +61,7 @@ threadexitsall(char *exitstr)
} }
/* leave */ /* leave */
exit(0); exits(0);
} }
Channel* Channel*

View file

@ -29,7 +29,7 @@ _threaddie(int x)
USED(x); USED(x);
if(_threadexitsallstatus) if(_threadexitsallstatus)
_exit(_threadexitsallstatus[0] ? 1 : 0); _exits(_threadexitsallstatus);
} }
int int
@ -109,7 +109,7 @@ _schedexit(Proc *p)
strncpy(ex, p->exitstr, sizeof ex); strncpy(ex, p->exitstr, sizeof ex);
ex[sizeof ex-1] = '\0'; ex[sizeof ex-1] = '\0';
free(p); free(p);
_exit(ex[0]); _exits(ex);
} }
int int

View file

@ -38,7 +38,7 @@ _schedinit(void *arg)
; ;
_threaddebug(DBGSCHED, "top of schedinit, _threadexitsallstatus=%p", _threadexitsallstatus); _threaddebug(DBGSCHED, "top of schedinit, _threadexitsallstatus=%p", _threadexitsallstatus);
if(_threadexitsallstatus) if(_threadexitsallstatus)
exits(_threadexitsallstatus); _exits(_threadexitsallstatus);
lock(&p->lock); lock(&p->lock);
if((t=p->thread) != nil){ if((t=p->thread) != nil){
p->thread = nil; p->thread = nil;
@ -149,7 +149,7 @@ relock:
unlock(&p->readylock); unlock(&p->readylock);
while(rendezvous((ulong)q, 0) == ~0){ while(rendezvous((ulong)q, 0) == ~0){
if(_threadexitsallstatus) if(_threadexitsallstatus)
exits(_threadexitsallstatus); _exits(_threadexitsallstatus);
} }
/* lock picked up from _threadready */ /* lock picked up from _threadready */
} }
@ -249,7 +249,7 @@ _threadready(Thread *t)
_threaddebug(DBGSCHED, "waking process %d", t->proc->pid); _threaddebug(DBGSCHED, "waking process %d", t->proc->pid);
while(rendezvous((ulong)q, 0) == ~0){ while(rendezvous((ulong)q, 0) == ~0){
if(_threadexitsallstatus) if(_threadexitsallstatus)
exits(_threadexitsallstatus); _exits(_threadexitsallstatus);
} }
}else }else
unlock(&t->proc->readylock); unlock(&t->proc->readylock);