anchor.diff:      ThreadData^.Func := func;
       ThreadData^.Data := user_data;
   
  -    // Start thread
  -    TID := TThreadID(BeginThread(@C2P_Translator, ThreadData));
  -
  -    if TID <> TThreadID(0) then
  +    // Start thread suspended
  +    TThreadID(thread_def^) := BeginThread(@C2P_Translator, ThreadData);
  +
  +    if TThreadID(thread_def^) > 0 then
       begin
         // Don't free memory here, it will be done in the thread function
         Result := 1;
  -      TThreadID(thread_def^) := TID;
       end
       else
       begin
         // Free memory
         dispose(ThreadData);
         Result := 0;
  -      TThreadID(thread_def^) := TThreadID(0);
       end;
     end
     else Result := 0;
  
positive.code: 
    //Finally we run the thread function
    Result := ptrint(ThreadData.Func(ThreadData.Data));
  end;
  
  { FPC specific thread create function to replace Vortex's thread create.
  
negative.code: 
      // Wait for thread
      err := WaitForThreadTerminate(TID, 2000);
      CloseThread(TID);
  
      // Free resources
      if free_data = 1 then
         tml_Sys_Free(thread_def);
  
      if err = 0 then Result := 1
                 else Result := 0;
  