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

@@ -296,10 +296,10 @@ static int cleanRestoreErr(pRestoreObj self, SConnection * pCon, int hard)
}
if (errMsg) {
SCWrite(pCon, errMsg, eError);
LLDstringDelete(newErrList);
LLDdeleteString(newErrList);
} else {
/* swap lists */
LLDstringDelete(self->errList);
LLDdeleteString(self->errList);
self->errList = newErrList;
SCPrintf(pCon, eLog, "CleanErr: %d pairs in, %d pairs out", count_in, count_ex);
}
@@ -397,5 +397,5 @@ void StatusFileDirty(void)
/*-----------------------------------------------------------------------*/
void StatusFileInit(void)
{
TaskRegisterN(pServ->pTasker, "statusfile", StatusFileTask, NULL, NULL, NULL, 0);
TaskRegisterN(pServ->pTasker, "statusfile", StatusFileTask, NULL, NULL, NULL, TASK_PRIO_HIGH);
}