anchor.diff:    WM_NOTIFY_WORK = WM_USER + 2;
   {$ENDIF}
   
  +{$IF RTLVersion<24}
  +function AtomicCmpExchange(var Target: Integer; Value: Integer;
  +  Comparand: Integer): Integer;
  +begin
  +{$IFDEF MSWINDOWS}
  +  Result := InterlockedCompareExchange(Target, Value, Comparand);
  +{$ELSE}
  +  Result := TInterlocked.CompareExchange(Target, Value, Comparand);
  +{$ENDIF}
  +end;
  +{$IFEND <XE5}
  +
  +{$IFDEF MSWINDOWS}
  +{$ELSE}
  +function GetCurrentProcessId():Integer;
  +begin
  +  Result := 0;
  +end;
  +{$ENDIF}
  +
  +
  +function QueryTickCount: Integer;
  +begin
  +{$IFDEF MSWINDOWS}
  +  Result := GetTickCount;
  +{$ELSE}
  +  Result := TThread.GetTickCount;;
  +{$ENDIF}
  +end;
  +
   function tick_diff(tick_start, tick_end: Cardinal): Cardinal;
   begin
     if tick_end >= tick_start then
  
positive.code: 
        if lvWrite then
        begin
          if tick_diff(l, GetTickCount) > 10000 then
          begin
            writeSafeInfo(FName + 'is dead, debugInfo:'  + FDebugInfo);
            lvWrite := false;
  
negative.code:   end;
  end;
  
  
  
  procedure SafeWriteFileMsg(pvMsg:String; pvFilePre:string);
  var
  