Saving now before KDE Plasma crashes
This commit is contained in:
parent
0b8c384602
commit
152e4429af
2 changed files with 12 additions and 7 deletions
|
|
@ -255,7 +255,8 @@ void logOutput(ConfigDataType *configPtr, char *logStr, bool isEnd)
|
|||
if(fileWritePtr != NULL)
|
||||
{
|
||||
//
|
||||
printf("%s\n", logStr);
|
||||
fprintf(fileWritePtr, "%s", logStr);
|
||||
fprintf(stdout, "%s", logStr);
|
||||
}
|
||||
// no return, void
|
||||
// close the file, if at the end.
|
||||
|
|
@ -302,19 +303,23 @@ void runSim(ConfigDataType *configPtr, OpCodeType *metaDataMstrPtr)
|
|||
pcbList = createProcessList();
|
||||
// fill the process list given the metadata
|
||||
pcbList = fillProcessList(metaDataMstrPtr, pcbList);
|
||||
pcbPtr = pcbList->headPtr;
|
||||
// create temp strings
|
||||
char *command;
|
||||
char *argument;
|
||||
// int iterator
|
||||
int pcbIterator;
|
||||
|
||||
// get the first data out of the metadata
|
||||
command = metaDataMstrPtr->command;
|
||||
argument = metaDataMstrPtr->strArg1;
|
||||
|
||||
// set the master working pointer to the first metadata block
|
||||
// wkgPtrMaster = metaDataMstrPtr;
|
||||
// calculate pcb total time
|
||||
int totalPCBTime = 0;
|
||||
while(pcbPtr != NULL)
|
||||
{
|
||||
//
|
||||
totalPCBTime = totalPCBTime + pcbPtr->timeLeft;
|
||||
pcbPtr = pcbPtr->nextPtr;
|
||||
}
|
||||
pcbPtr = pcbList->headPtr;
|
||||
|
||||
// set the current process id to the first scheduled process
|
||||
currentPid = scheduleProcess(pcbList, configPtr);
|
||||
// function holds master loop, loops until sys end opcode found OR wkgPtrMaster nextNode != NULL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue