Saving now before KDE Plasma crashes

This commit is contained in:
Charles Descamps 2024-02-22 00:53:50 -07:00
parent 0b8c384602
commit 152e4429af
2 changed files with 12 additions and 7 deletions

Binary file not shown.

View file

@ -255,7 +255,8 @@ void logOutput(ConfigDataType *configPtr, char *logStr, bool isEnd)
if(fileWritePtr != NULL) if(fileWritePtr != NULL)
{ {
// //
printf("%s\n", logStr); fprintf(fileWritePtr, "%s", logStr);
fprintf(stdout, "%s", logStr);
} }
// no return, void // no return, void
// close the file, if at the end. // close the file, if at the end.
@ -302,19 +303,23 @@ void runSim(ConfigDataType *configPtr, OpCodeType *metaDataMstrPtr)
pcbList = createProcessList(); pcbList = createProcessList();
// fill the process list given the metadata // fill the process list given the metadata
pcbList = fillProcessList(metaDataMstrPtr, pcbList); pcbList = fillProcessList(metaDataMstrPtr, pcbList);
pcbPtr = pcbList->headPtr;
// create temp strings // create temp strings
char *command; char *command;
char *argument; char *argument;
// int iterator // int iterator
int pcbIterator; int pcbIterator;
// get the first data out of the metadata // calculate pcb total time
command = metaDataMstrPtr->command; int totalPCBTime = 0;
argument = metaDataMstrPtr->strArg1; while(pcbPtr != NULL)
{
// set the master working pointer to the first metadata block //
// wkgPtrMaster = metaDataMstrPtr; totalPCBTime = totalPCBTime + pcbPtr->timeLeft;
pcbPtr = pcbPtr->nextPtr;
}
pcbPtr = pcbList->headPtr; pcbPtr = pcbList->headPtr;
// set the current process id to the first scheduled process // set the current process id to the first scheduled process
currentPid = scheduleProcess(pcbList, configPtr); currentPid = scheduleProcess(pcbList, configPtr);
// function holds master loop, loops until sys end opcode found OR wkgPtrMaster nextNode != NULL // function holds master loop, loops until sys end opcode found OR wkgPtrMaster nextNode != NULL