[Mit-cadr-cvs] r374 - trunk/emulator/usim

ggilley at common-lisp.net ggilley at common-lisp.net
Thu Nov 29 07:17:25 UTC 2012


Author: ggilley
Date: Wed Nov 28 23:17:24 2012
New Revision: 374

Log:
another stab at hang on close

Modified:
   trunk/emulator/usim/Files.c
   trunk/emulator/usim/chaos.c

Modified: trunk/emulator/usim/Files.c
==============================================================================
--- trunk/emulator/usim/Files.c	Wed Nov 28 21:59:44 2012	(r373)
+++ trunk/emulator/usim/Files.c	Wed Nov 28 23:17:24 2012	(r374)
@@ -2600,6 +2600,13 @@
 #if 0
 	(void)signal(SIGHUP, SIG_IGN);
 #endif
+#if defined(OSX)
+	dispatch_semaphore_signal(x->x_hangsem);
+#else
+	pthread_mutex_lock(&x->x_hangsem);
+	pthread_cond_signal(&x->x_hangcond);
+	pthread_mutex_unlock(&x->x_hangsem);
+#endif
 }
 
 /*

Modified: trunk/emulator/usim/chaos.c
==============================================================================
--- trunk/emulator/usim/chaos.c	Wed Nov 28 21:59:44 2012	(r373)
+++ trunk/emulator/usim/chaos.c	Wed Nov 28 23:17:24 2012	(r374)
@@ -805,7 +805,7 @@
             free(node);
         if (packet)
         {
-            if ((packet->opcode >> 8) != CHAOS_OPCODE_SNS && cmp_gt(packet->number, conn->lastreceived))
+            if (cmp_gt(packet->number, conn->lastreceived))
                 conn->lastreceived = packet->number;
             conn->remotelastreceived = packet->acknowledgement;
             if (3 * (short)(conn->lastreceived - conn->lastacked) > conn->rwsize)




More information about the mit-cadr-cvs mailing list