Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1494229
 поиск   регистрация   авторизация 
 
Группа :: Эмуляторы
Пакет: dosemu

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: dosemu-1.1.4-stas-coopthreads.diff


# Stas Sergeev (stsp)
# SourceForge bugtracker ID #605551
--- src/plugin/coopthreads/coopthreads.c.old	Tue Mar 19 00:58:14 2002
+++ src/plugin/coopthreads/coopthreads.c	Sat Sep  7 01:51:36 2002
@@ -1804,7 +1804,7 @@
 
 	/* install own INT 23/24 handlers */
 	install_com_fatal_handlers();
-
+//error("Before start: owntcb=%p tcb0=%p\n",owntcb);
 	/* call the program, but do setjmp for 'exit()' */
 	if (!setjmp(NONVOLATILE_OWNTCB->exit_context)) {
 		LWORD(eax) = (*(owntcb->pent->program))(argc, argv);
@@ -1817,6 +1817,7 @@
 	 */
 	struct com_starter_seg  *ctcb = owntcb->params;
 
+//error("After start: owntcb=%p tcb0=%p\n",owntcb);
 	if (ctcb->mode_flags & CDEBUG || DEBUG > 3) {
 		c_printf("coopthreads: PSP %04x terminated, heap used 0x%x bytes\n",
 			ctcb->real_psp, ctcb->heapptr - ctcb->heapstart);
@@ -1833,8 +1834,9 @@
 	 */
 	delete_thread(0, tcb0);
 
+error("Cannot be here: owntcb=%p tcb0=%p\n",owntcb);
 	/* we should never come here */
-	while (1);
+	leavedos(1);
     }
 }
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005