(lwpReschedule): Use CANT_HAPPEN() and abort() instead of lwpStatus()
and exit() for fatal internal errors.
This commit is contained in:
parent
6d4d5f7abf
commit
87c3790169
1 changed files with 4 additions and 8 deletions
|
@ -90,10 +90,8 @@ lwpReschedule(void)
|
|||
/* destroy dead threads */
|
||||
lwpStatus(LwpCurrent, "Cleaning dead queue");
|
||||
while (NULL != (nextp = lwpGetFirst(&LwpDeadQ))) {
|
||||
if (nextp == LwpCurrent) {
|
||||
lwpStatus(nextp, "OOOPS, we are running already dead thread");
|
||||
exit(1);
|
||||
}
|
||||
if (CANT_HAPPEN(nextp == LwpCurrent))
|
||||
abort();
|
||||
lwpDestroy(nextp);
|
||||
lwpStatus(LwpCurrent, "Destroying done");
|
||||
}
|
||||
|
@ -115,10 +113,8 @@ lwpReschedule(void)
|
|||
if (nextp)
|
||||
break;
|
||||
}
|
||||
if (LwpCurrent == 0 && nextp == 0) {
|
||||
fprintf(stderr, "No processes to run!\n");
|
||||
exit(1);
|
||||
}
|
||||
if (CANT_HAPPEN(LwpCurrent == 0 && nextp == 0))
|
||||
abort();
|
||||
if (LwpCurrent != nextp) {
|
||||
struct lwpProc *oldp = LwpCurrent;
|
||||
if (oldp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue