anchor.diff:  var
     thread : TTestSemaphoreThread;
   begin
  -  globalInt := 0;
  +  globalNum := 0;
     sem := TSemaphore.Create(nil, 0, 1, '');
     try
       thread := TTestSemaphoreThread.Create(false);
       try
         thread.FreeOnTerminate := true;
  -      while (globalInt = 0) do
  +      while (globalNum = 0) do
           sleep(100);
  -      assertTrue(globalInt = 1, '1');
  +      assertTrue(globalNum = 1, '1');
         sem.Release;
         sleep(500);
  -      assertTrue(globalInt = 2, '2');
  +      assertTrue(globalNum = 2, '2');
         sem.Release;
         sleep(500);
  -      assertTrue(globalInt = 3, '3');
  +      assertTrue(globalNum = 3, '3');
         sleep(500);
  -      assertTrue(globalInt = 3, '4');
  +      assertTrue(globalNum = 3, '4');
       finally
         thread.Terminate;
         sem.release;
       end;
       sleep(500);
  -    assertTrue(globalInt = 100, '100');
  +    assertTrue(globalNum = 100, '100');
     finally
       sem.Free;
     end;
  
positive.code: begin
    EnterCriticalSection(cs);
    try
      globalInt := GetCurrentThreadId;
    finally
      LeaveCriticalSection(cs);
    end;
  
negative.code: 
  procedure TXPlatformTests.TestKCriticalSectionThreaded;
  begin
    globalThread := GetCurrentThreadId;
    kcs := TFslLock.Create('none');
    try
      kcs.Enter;
      try
        TTestKCriticalSectionThread.create(false);
        Sleep(10);
        assertTrue(globalThread = GetCurrentThreadId);
      finally
        kcs.Leave;
      end;
      sleep(10);
      kcs.Enter;
      try
        assertTrue(globalThread <> GetCurrentThreadId);
      finally
        kcs.Leave;
      end;
  