A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4751

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

contextSwitch - mcpaste

contextSwitch

Von MC_J, 9 Jahre vorher, geschrieben in C++, aufgerufen 1'528 mal.
URL https://mcpaste.de/view/a685ef90 Einbetten
Paste herunterladen oder Rohtext anzeigen
  1. void rmminixOS::contextSwitch(int tpid){
  2.     std::cout << "tpid = " << tpid << std::endl;
  3.     if (tpid == -1)
  4.     {
  5.         savedProcesses.at(pid)->saveCPU(theCPU, instructionNumberToRestore, registerNumberToUpdate);
  6.         int fin = 0;
  7.         for(int i = pid + 1; i<=pidmax; i++)
  8.         {
  9.             if(pid == pidmax)
  10.             {
  11.                 if(fin == 1)
  12.                     exit(-1); // BRUTAL
  13.                 i = 0;
  14.                 fin = 1;
  15.                 continue;
  16.             }
  17.             if(savedProcesses.at(i) != 0)
  18.             {
  19.                 pid = i;
  20.                 std::cout << "New PID = " << pid << std::endl;
  21.                 rmminixOS::contextSwitch(pid);
  22.                 return;
  23.             }
  24.         }
  25.     }else{
  26.         savedProcesses.at(tpid)->saveCPU(theCPU, instructionNumberToRestore, registerNumberToUpdate);
  27.         pid = tpid;
  28.         instructionNumberToRestore = savedProcesses.at(pid)->instN;
  29.         registerNumberToUpdate = savedProcesses.at(pid)->regN;
  30.         savedProcesses.at(pid)->restoreCPU(theCPU);
  31.         std::cout << "Loaded from " << pid <<": New PC = " << theCPU->registers[0] << std::endl;
  32.         return;
  33.     }
  34. }

Antwort auf "contextSwitch"

Hier kannst Du auf den Paste von oben antworten

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876