소스 검색

reintroduced generic implementations lock field (used by LinuxG)

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6909 8c9fc860-2736-0410-a75d-ab315db34111
felixf 8 년 전
부모
커밋
af0440943f
2개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      source/FoxIntermediateBackend.Mod
  2. 1 0
      source/Heaps.Mod

+ 3 - 3
source/FoxIntermediateBackend.Mod

@@ -11113,7 +11113,7 @@ TYPE
 		PROCEDURE ProtectedHeapBlock(CONST moduleName, typeName: ARRAY OF CHAR; section: IntermediateCode.Section; dataAdrOffset: LONGINT);
 		VAR i: LONGINT;
 		BEGIN
-			INC(dataAdrOffset,14);
+			INC(dataAdrOffset,14); (*! change this when changing data structure below *)
 			HeapBlock(moduleName,typeName,section,dataAdrOffset);
 			Info(section,"count*: LONGINT");
 			Longint(section,0);
@@ -11127,13 +11127,13 @@ TYPE
 			Address(section,0);
 			Info(section,"lockedBy*: ANY");
 			Address(section,0);
-			Info(section,"lock*: ANY");
-			Address(section,0);
 			Info(section,"waitingPriorities*: ARRAY NumPriorities OF LONGINT");
 			Longint(section,1);
 			FOR i := 2 TO 6 DO
 			Longint(section,0);
 			END;
+			Info(section,"lock*: ANY");
+			Address(section,0);
 		END ProtectedHeapBlock;
 
 		PROCEDURE Info(section: IntermediateCode.Section; CONST s: ARRAY OF CHAR);

+ 1 - 0
source/Heaps.Mod

@@ -106,6 +106,7 @@ TYPE
 		awaitingLock*, awaitingCond*: ProcessQueue;
 		lockedBy*: ANY;
 		waitingPriorities*: ARRAY NumPriorities OF LONGINT;
+		lock*: ANY; (* generic implementation slot -- used by LinuxAos *)
 	END;
 
 	ArrayBlock* = POINTER TO ArrayBlockDesc;