PSI sics-cvs-psi-complete-tree-post-site-support

This commit is contained in:
2004-03-09 15:18:11 +00:00
committed by Douglas Clowes
parent 6373f6b0fb
commit ae77364de2
196 changed files with 8344 additions and 3485 deletions

View File

@@ -431,11 +431,15 @@
}
break;
case HWBusy:
if(pCountInt)
if(pCountInt != NULL && pDrivInt != NULL)
{
SetStatus(eCountDrive);
}
else if(pCountInt != NULL && pDrivInt == NULL)
{
SetStatus(eCounting);
}
else if(pDrivInt)
else if(pDrivInt != NULL && pCountInt == NULL)
{
SetStatus(eDriving);
}
@@ -644,7 +648,7 @@
assert(self);
/* step through the list */
iRes = 0;
iRes = 1;
iRet = LLDnodePtr2First(self->iList);
while(iRet != 0)
{
@@ -702,7 +706,7 @@
assert(self);
/* step through the list */
iRes = 0;
iRes = 1;
iRet = LLDnodePtr2First(self->iList);
while(iRet != 0)
{
@@ -771,7 +775,7 @@
assert(pData);
/* check Privilege: Muggers may do it */
if(!SCMatchRights(pCon,usMugger))
if(!SCMatchRights(pCon,usUser))
{
SCWrite(pCon,"ERROR: NO Privilege to Stop operation ",eError);
return 0;
@@ -834,6 +838,50 @@
SetStatus(eEager);
return iRet;
}
/*-------------------------------------------------------------------------*/
int PauseAction(SConnection *pCon, SicsInterp *pSics, void *pData,
int argc, char *argv[])
{
int status;
status = PauseExecution((pExeList)pData);
if(status)
{
SCSendOK(pCon);
return 1;
}
else
{
SCWrite(pCon,"ERROR: failed to pause",eError);
return 0;
}
}
/*-------------------------------------------------------------------------*/
int ContinueAction(SConnection *pCon, SicsInterp *pSics, void *pData,
int argc, char *argv[])
{
int status;
Status eStat;
eStat = GetStatus();
if(eStat != ePaused)
{
SCWrite(pCon,"ERROR: Not paused, ignored",eError);
return 0;
}
status = ContinueExecution((pExeList)pData);
if(status)
{
SCSendOK(pCon);
return 1;
}
else
{
SCWrite(pCon,"ERROR: failed to pause",eError);
return 0;
}
}
/*--------------------------------------------------------------------------*/
int isInRunMode(pExeList self)
@@ -859,7 +907,8 @@
int DevExecTask(void *pData)
{
pExeList self = NULL;
int iRet;
char pBueffel[132], pInterrupt[80];
int iRet, iInterrupt;
self = (pExeList)pData;
@@ -875,11 +924,17 @@
switch(iRet)
{
case -1: /* some problem */
if(SCGetInterrupt(self->pOwner) != eContinue)
iInterrupt = SCGetInterrupt(self->pOwner);
if(iInterrupt != eContinue)
{
SCWrite(self->pOwner,"ERROR: aborting operation due to HW problem",
eError);
SCWrite(self->pOwner,pBueffel, eError);
if(iInterrupt > 1)
{
Interrupt2Text(iInterrupt,pInterrupt,79);
snprintf(pBueffel,131,"ERROR: interrupt %s triggered",
pInterrupt);
StopExe(self,"all");
}
#ifdef DEBUG
printf("DevExecTask found an error\n");
#endif