(lwpReschedule): Use CANT_HAPPEN() and abort() instead of lwpStatus()

and exit() for fatal internal errors.
This commit is contained in:
Markus Armbruster 2006-05-01 17:10:50 +00:00
parent 6d4d5f7abf
commit 87c3790169

View file

@ -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)