Selaa lähdekoodia

rendered CancelTimeout consistent even when called on non-scheduled timer.

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6740 8c9fc860-2736-0410-a75d-ab315db34111
eth.hunzikerp 9 vuotta sitten
vanhempi
commit
8eb7de5c02
1 muutettua tiedostoa jossa 3 lisäystä ja 4 poistoa
  1. 3 4
      source/Objects.Mod

+ 3 - 4
source/Objects.Mod

@@ -999,10 +999,9 @@ PROCEDURE CancelTimeout*(t: Timer);
 BEGIN
 	Machine.Acquire(Machine.Objects);
 	ASSERT(t # event);
-	IF t.next # NIL THEN
-		t.next.prev := t.prev; t.prev.next := t.next;
-		t.next := NIL; t.prev := NIL
-	END;
+	IF t.prev #NIL THEN t.prev.next := t.next END;
+	IF t.next # NIL THEN t.next.prev := t.prev; END;
+	t.next := NIL; t.prev := NIL
 	Machine.Release(Machine.Objects)
 END CancelTimeout;