Restore use of OK/ERROR for function return values.

This commit is contained in:
Ron Sluiter
2002-10-31 21:07:25 +00:00
parent 67525bd0c8
commit ad7ade15e0
2 changed files with 17 additions and 14 deletions
+10 -8
View File
@@ -2,9 +2,9 @@
FILENAME... devSoft.c
USAGE... Motor record device level support for Soft channel.
Version: $Revision: 1.1 $
Version: $Revision: 1.2 $
Modified By: $Author: sluiter $
Last Modified: $Date: 2002-10-21 21:08:59 $
Last Modified: $Date: 2002-10-31 21:07:25 $
*/
/*
@@ -35,6 +35,8 @@ Last Modified: $Date: 2002-10-21 21:08:59 $
* - In soft_rdbl_func(), reset motor record's target to actual
* position after last readback if motion was not initiated
* by this record.
* .01 10-29-02 rls - LOCK field added to prevent synchronization due to
* changing readback.
*/
@@ -57,10 +59,10 @@ NOTES...
#define STATIC static
STATIC long update(struct motorRecord *);
STATIC CALLBACK_VALUE update(struct motorRecord *);
STATIC long start(struct motorRecord *);
STATIC RTN_STATUS build(motor_cmnd, double *, struct motorRecord *);
STATIC long end(struct motorRecord *);
STATIC RTN_STATUS end(struct motorRecord *);
STATIC void soft_process(struct motorRecord *);
@@ -74,7 +76,7 @@ struct motor_dset devMotorSoft =
};
STATIC long update(struct motorRecord *mr)
STATIC CALLBACK_VALUE update(struct motorRecord *mr)
{
struct soft_private *ptr = (struct soft_private *) mr->dpvt;
@@ -96,17 +98,17 @@ STATIC long update(struct motorRecord *mr)
STATIC long start(struct motorRecord *mr)
{
return((long) 0);
return((long) OK);
}
STATIC long end(struct motorRecord *mr)
STATIC RTN_STATUS end(struct motorRecord *mr)
{
struct soft_private *ptr = (struct soft_private *) mr->dpvt;
if (ptr->default_done_behavior == YES)
mr->msta = RA_DONE;
return((long) 0);
return(OK);
}
+7 -6
View File
@@ -2,9 +2,9 @@
FILENAME... devSoftAux.c
USAGE... Motor record device level support for Soft channel.
Version: $Revision: 1.1 $
Version: $Revision: 1.2 $
Modified By: $Author: sluiter $
Last Modified: $Date: 2002-10-21 21:09:00 $
Last Modified: $Date: 2002-10-31 21:06:24 $
*/
/*
@@ -44,6 +44,7 @@ in the same file; each defines (redefines) the DBR's.
#include <epicsThread.h>
#include "motorRecord.h"
#include "motor.h"
#include "devSoft.h"
#define STATIC static
@@ -98,7 +99,7 @@ long soft_init(void *after)
if (dbCaTask_tid == 0)
{
errMessage(0, "cannot find dbCaLink task.");
return(-1);
return(ERROR);
}
soft_motor_priority = epicsThreadGetPriority(dbCaTask_tid);
soft_motor_priority -= 1;
@@ -108,7 +109,7 @@ long soft_init(void *after)
}
else
epicsEventSignal(soft_motor_sem); /* Start soft_motor_task(). */
return((long) 0);
return(OK);
}
@@ -121,10 +122,10 @@ long soft_init_record(void *arg)
static int count = 0;
if (++count > MAXMSGS)
return(-1);
return(ERROR);
if (!epicsRingPointerPush(soft_motor_msgQ, (void *) mr))
status = -1;
status = ERROR;
/* Allocate space for private field. */
mr->dpvt = (struct soft_private *) malloc(sizeof(struct soft_private));