Implement task priorities and message queues

This commit is contained in:
Douglas Clowes
2015-07-29 17:47:46 +10:00
parent 0db57b9bae
commit eff54a5fd9
24 changed files with 1440 additions and 269 deletions

View File

@ -452,7 +452,10 @@ SConnection *SCCopyConnection(SConnection * pCon)
result->iMacro = pCon->iMacro;
result->iTelnet = pCon->iTelnet;
result->iOutput = pCon->iOutput;
result->write = pCon->write;
if (pCon->oldWriteFunc != NULL)
result->write = pCon->oldWriteFunc;
else
result->write = pCon->write;
result->listening = pCon->listening;
result->eInterrupt = pCon->eInterrupt;
result->inUse = pCon->inUse;
@ -467,7 +470,6 @@ SConnection *SCCopyConnection(SConnection * pCon)
result->contextStack = -1;
result->iList = -1;
result->runLevel = pCon->runLevel;
result->data = pCon->data;
return result;
}
@ -2272,7 +2274,7 @@ int LogCapture(SConnection * pCon, SicsInterp * pSics, void *pData,
if (code_bits & (1 << i)) {
if (GetDynStringLength(buffer) > 0)
DynStringConcatChar(buffer, ',');
DynStringConcat(buffer, OutCodeToTxt(i));
DynStringConcat(buffer, (char *)OutCodeToTxt(i));
}
}
SCPrintf(pCon, eLog, "getlog %s", GetCharArray(buffer));
@ -2291,7 +2293,7 @@ int LogCapture(SConnection * pCon, SicsInterp * pSics, void *pData,
if (code_bits & (1 << i)) {
if (GetDynStringLength(buffer) > 0)
DynStringConcatChar(buffer, ',');
DynStringConcat(buffer, OutCodeToTxt(i));
DynStringConcat(buffer, (char *)OutCodeToTxt(i));
}
}
SCPrintf(pCon, eLog, "getlog %s", GetCharArray(buffer));