changes for 3.14
This commit is contained in:
@@ -1,7 +1,40 @@
|
||||
|
||||
TOP=../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
USR_CFLAGS += -D_NO_PROTO
|
||||
|
||||
INC := asDbLib.h asLib.h
|
||||
|
||||
# build lib As from asLib.c:
|
||||
#
|
||||
LIBSRCS := asLib.c
|
||||
LIBRARY := As
|
||||
|
||||
|
||||
# All systems link the libs As, Com, Db (and again Com ??),
|
||||
# generic Unix needs also lib m:
|
||||
#
|
||||
SYS_PROD_LIBS_DEFAULT := m
|
||||
SYS_PROD_LIBS_WIN32 := -nil-
|
||||
PROD_LIBS := As Com Db Com Osi
|
||||
|
||||
PROD := ascheck
|
||||
|
||||
asLibrary_CFLAGS = -DACCESS_SECURITY -D_NO_PROTO
|
||||
|
||||
asLibrary_SRCS = asDbLib.c asCa.c asLib.c
|
||||
|
||||
IOC_LIBRARY_vxWorks = asLibrary
|
||||
|
||||
include $(TOP)/configure/RULES_BUILD
|
||||
|
||||
# Extra rule since asLib_lex.c is included in asLib.c
|
||||
# In my opinion, these objects should really be built
|
||||
# independently.
|
||||
asLib$(OBJ): asLib_lex.c ../asLibRoutines.c
|
||||
|
||||
clean::
|
||||
@$(RM) asLib.c asLib_lex.c
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_CFLAGS += -D_NO_PROTO
|
||||
|
||||
INC := asDbLib.h asLib.h
|
||||
|
||||
# build lib As from asLib.c:
|
||||
#
|
||||
LIBSRCS := asLib.c
|
||||
LIBRARY := As
|
||||
|
||||
|
||||
# All systems link the libs As, Com, Db (and again Com ??),
|
||||
# generic Unix needs also lib m:
|
||||
#
|
||||
SYS_PROD_LIBS_DEFAULT := m
|
||||
SYS_PROD_LIBS_WIN32 := -nil-
|
||||
PROD_LIBS := As Com Db Com
|
||||
|
||||
PROD := ascheck
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
|
||||
# Extra rule since asLib_lex.c is included in asLib.c
|
||||
# In my opinion, these objects should really be built
|
||||
# independently.
|
||||
asLib$(OBJ): asLib_lex.c ../asLibRoutines.c
|
||||
|
||||
clean::
|
||||
@$(RM) asLib.c asLib_lex.c
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_CFLAGS = -DACCESS_SECURITY -D_NO_PROTO
|
||||
|
||||
SRCS.c = ../asDbLib.c ../asCa.c asLib.c
|
||||
LIBOBJS = asDbLib.o asCa.o asLib.o
|
||||
LIBNAME = asLibrary
|
||||
|
||||
include $(TOP)/config/RULES.Vx
|
||||
|
||||
# Extra rule since asLib_lex.c is included in asLib.c
|
||||
# In my opinion, these objects should really be built
|
||||
# independently.
|
||||
asLib.o: asLib_lex.c ../asLibRoutines.c
|
||||
|
||||
clean::
|
||||
@$(RM) asLib_lex.c asLib.c
|
||||
|
||||
|
||||
@@ -19,33 +19,32 @@ of this distribution.
|
||||
*/
|
||||
|
||||
/*This module is separate from asDbLib because CA uses old database access*/
|
||||
#include <vxWorks.h>
|
||||
#include <taskLib.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <semLib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "dbDefs.h"
|
||||
#include "osiThread.h"
|
||||
#include "osiSem.h"
|
||||
#include "cantProceed.h"
|
||||
#include "errlog.h"
|
||||
#include "taskwd.h"
|
||||
#include "asDbLib.h"
|
||||
#include "cadef.h"
|
||||
#include "caerr.h"
|
||||
#include "caeventmask.h"
|
||||
#include "task_params.h"
|
||||
#include "alarm.h"
|
||||
|
||||
int asCaDebug = 0;
|
||||
extern ASBASE volatile *pasbase;
|
||||
LOCAL int firstTime = TRUE;
|
||||
LOCAL int taskid=0;
|
||||
LOCAL threadId threadid=0;
|
||||
LOCAL int caInitializing=FALSE;
|
||||
LOCAL SEM_ID asCaTaskLock; /*lock access to task */
|
||||
LOCAL SEM_ID asCaTaskWait; /*Wait for task to respond*/
|
||||
LOCAL SEM_ID asCaTaskAddChannels; /*Tell asCaTask to add channels*/
|
||||
LOCAL SEM_ID asCaTaskClearChannels; /*Tell asCaTask to clear channels*/
|
||||
LOCAL semId asCaTaskLock; /*lock access to task */
|
||||
LOCAL semId asCaTaskWait; /*Wait for task to respond*/
|
||||
LOCAL semId asCaTaskAddChannels; /*Tell asCaTask to add channels*/
|
||||
LOCAL semId asCaTaskClearChannels; /*Tell asCaTask to clear channels*/
|
||||
|
||||
typedef struct {
|
||||
struct dbr_sts_double rtndata;
|
||||
@@ -133,13 +132,10 @@ LOCAL void asCaTask(void)
|
||||
CAPVT *pcapvt;
|
||||
int status;
|
||||
|
||||
taskwdInsert(taskIdSelf(),NULL,NULL);
|
||||
taskwdInsert(threadGetIdSelf(),NULL,NULL);
|
||||
SEVCHK(ca_task_initialize(),"ca_task_initialize");
|
||||
while(TRUE) {
|
||||
if(semTake(asCaTaskAddChannels,WAIT_FOREVER)!=OK) {
|
||||
epicsPrintf("asCa semTake error for asCaTaskClearChannels\n");
|
||||
taskSuspend(0);
|
||||
}
|
||||
semBinaryTakeAssert(asCaTaskAddChannels);
|
||||
caInitializing = TRUE;
|
||||
pasg = (ASG *)ellFirst(&pasbase->asgList);
|
||||
while(pasg) {
|
||||
@@ -168,9 +164,9 @@ LOCAL void asCaTask(void)
|
||||
asComputeAllAsg();
|
||||
caInitializing = FALSE;
|
||||
if(asCaDebug) printf("asCaTask initialized\n");
|
||||
semGive(asCaTaskWait);
|
||||
semBinaryGive(asCaTaskWait);
|
||||
while(TRUE) {
|
||||
if(semTake(asCaTaskClearChannels,NO_WAIT)==OK) break;
|
||||
if(semBinaryTakeNoWait(asCaTaskClearChannels)==semTakeOK) break;
|
||||
ca_pend_event(2.0);
|
||||
}
|
||||
pasg = (ASG *)ellFirst(&pasbase->asgList);
|
||||
@@ -190,7 +186,7 @@ LOCAL void asCaTask(void)
|
||||
pasg = (ASG *)ellNext((ELLNODE *)pasg);
|
||||
}
|
||||
if(asCaDebug) printf("asCaTask has cleared all channels\n");
|
||||
semGive(asCaTaskWait);
|
||||
semBinaryGive(asCaTaskWait);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,38 +195,36 @@ void asCaStart(void)
|
||||
if(asCaDebug) printf("asCaStart called\n");
|
||||
if(firstTime) {
|
||||
firstTime = FALSE;
|
||||
if((asCaTaskLock=semBCreate(SEM_Q_FIFO,SEM_FULL))==NULL)
|
||||
epicsPrintf("asCa semBCreate failure\n");
|
||||
if((asCaTaskWait=semBCreate(SEM_Q_FIFO,SEM_EMPTY))==NULL)
|
||||
epicsPrintf("asCa semBCreate failure\n");
|
||||
if((asCaTaskAddChannels=semBCreate(SEM_Q_FIFO,SEM_EMPTY))==NULL)
|
||||
epicsPrintf("asCa semBCreate failure\n");
|
||||
if((asCaTaskClearChannels=semBCreate(SEM_Q_FIFO,SEM_EMPTY))==NULL)
|
||||
epicsPrintf("asCa semBCreate failure\n");
|
||||
taskid = taskSpawn("asCaTask",CA_CLIENT_PRI-1,VX_FP_TASK,
|
||||
CA_CLIENT_STACK, (FUNCPTR)asCaTask,0,0,0,0,0,0,0,0,0,0);
|
||||
if(taskid==ERROR) {
|
||||
if((asCaTaskLock=semMutexCreate())==0)
|
||||
cantProceed("asCa semMutexCreate failure\n");
|
||||
if((asCaTaskWait=semBinaryCreate(semEmpty))==0)
|
||||
cantProceed("asCa semBinaryCreate failure\n");
|
||||
if((asCaTaskAddChannels=semBinaryCreate(semEmpty))==0)
|
||||
cantProceed("asCa semBinaryCreate failure\n");
|
||||
if((asCaTaskClearChannels=semBinaryCreate(semEmpty))==0)
|
||||
cantProceed("asCa semBCreate failure\n");
|
||||
threadid = threadCreate("asCaTask",
|
||||
(threadPriorityScanLow - 3),
|
||||
threadGetStackSize(threadStackBig),
|
||||
(THREADFUNC)asCaTask,0);
|
||||
if(threadid==0) {
|
||||
errMessage(0,"asCaStart: taskSpawn Failure\n");
|
||||
}
|
||||
}
|
||||
if(semTake(asCaTaskLock,WAIT_FOREVER)!=OK)
|
||||
epicsPrintf("asCa semTake error\n");
|
||||
semGive(asCaTaskAddChannels);
|
||||
if(semTake(asCaTaskWait,WAIT_FOREVER)!=OK)
|
||||
epicsPrintf("asCa semTake error\n");
|
||||
semMutexTakeAssert(asCaTaskLock);
|
||||
semBinaryGive(asCaTaskAddChannels);
|
||||
semBinaryTakeAssert(asCaTaskWait);
|
||||
if(asCaDebug) printf("asCaStart done\n");
|
||||
semGive(asCaTaskLock);
|
||||
semMutexGive(asCaTaskLock);
|
||||
}
|
||||
|
||||
void asCaStop(void)
|
||||
{
|
||||
if(taskid==0 || taskid==ERROR) return;
|
||||
if(threadid==0) return;
|
||||
if(asCaDebug) printf("asCaStop called\n");
|
||||
if(semTake(asCaTaskLock,WAIT_FOREVER)!=OK)
|
||||
epicsPrintf("asCa semTake error\n");
|
||||
semGive(asCaTaskClearChannels);
|
||||
if(semTake(asCaTaskWait,WAIT_FOREVER)!=OK)
|
||||
epicsPrintf("asCa semTake error\n");
|
||||
semMutexTakeAssert(asCaTaskLock);
|
||||
semBinaryGive(asCaTaskClearChannels);
|
||||
semBinaryTakeAssert(asCaTaskWait);
|
||||
if(asCaDebug) printf("asCaStop done\n");
|
||||
semGive(asCaTaskLock);
|
||||
semMutexGive(asCaTaskLock);
|
||||
}
|
||||
|
||||
@@ -18,14 +18,14 @@ of this distribution.
|
||||
* .01 02-11-94 mrk Initial Implementation
|
||||
*/
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <taskLib.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "dbDefs.h"
|
||||
#include "cantProceed.h"
|
||||
#include "osiThread.h"
|
||||
#include "errlog.h"
|
||||
#include "taskwd.h"
|
||||
#include "alarm.h"
|
||||
@@ -38,13 +38,12 @@ of this distribution.
|
||||
#include "dbCommon.h"
|
||||
#include "recSup.h"
|
||||
#include "subRecord.h"
|
||||
#include "task_params.h"
|
||||
|
||||
extern struct dbBase *pdbbase;
|
||||
|
||||
static char *pacf=NULL;
|
||||
static char *psubstitutions=NULL;
|
||||
static int initTaskId=0;
|
||||
static threadId asInitTheadId=0;
|
||||
static int firstTime = TRUE;
|
||||
|
||||
static long asDbAddRecords(void)
|
||||
@@ -148,23 +147,21 @@ static void asInitTask(ASDBCALLBACK *pcallback)
|
||||
{
|
||||
long status;
|
||||
|
||||
taskwdInsert(taskIdSelf(),wdCallback,pcallback);
|
||||
taskwdInsert(threadGetIdSelf(),wdCallback,pcallback);
|
||||
status = asInitCommon();
|
||||
taskwdRemove(taskIdSelf());
|
||||
initTaskId = 0;
|
||||
taskwdRemove(threadGetIdSelf());
|
||||
asInitTheadId = 0;
|
||||
if(pcallback) {
|
||||
pcallback->status = status;
|
||||
callbackRequest(&pcallback->callback);
|
||||
}
|
||||
status = taskDelete(taskIdSelf());
|
||||
if(status) errMessage(0,"asInitTask: taskDelete Failure");
|
||||
threadDestroy(threadGetIdSelf());
|
||||
}
|
||||
|
||||
int asInitAsyn(ASDBCALLBACK *pcallback)
|
||||
{
|
||||
|
||||
if(!pacf) return(0);
|
||||
if(initTaskId) {
|
||||
if(asInitTheadId) {
|
||||
errMessage(-1,"asInit: asInitTask already active");
|
||||
if(pcallback) {
|
||||
pcallback->status = S_asLib_InitFailed;
|
||||
@@ -172,15 +169,17 @@ int asInitAsyn(ASDBCALLBACK *pcallback)
|
||||
}
|
||||
return(-1);
|
||||
}
|
||||
initTaskId = taskSpawn("asInitTask",CA_CLIENT_PRI-1,VX_FP_TASK,CA_CLIENT_STACK,
|
||||
(FUNCPTR)asInitTask,(int)pcallback,0,0,0,0,0,0,0,0,0);
|
||||
if(initTaskId==ERROR) {
|
||||
errMessage(0,"asInit: taskSpawn Error");
|
||||
asInitTheadId = threadCreate("asInitTask",
|
||||
(threadPriorityChannelAccessServer + 9),
|
||||
threadGetStackSize(threadStackBig),
|
||||
(THREADFUNC)asInitTask,(void *)pcallback);
|
||||
if(asInitTheadId==0) {
|
||||
errMessage(0,"asInit: threadCreate Error");
|
||||
if(pcallback) {
|
||||
pcallback->status = S_asLib_InitFailed;
|
||||
callbackRequest(&pcallback->callback);
|
||||
}
|
||||
initTaskId = 0;
|
||||
asInitTheadId = 0;
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
@@ -208,7 +207,8 @@ long asSubInit(subRecord *precord,int pass)
|
||||
{
|
||||
ASDBCALLBACK *pcallback;
|
||||
|
||||
pcallback = (ASDBCALLBACK *)calloc(1,sizeof(ASDBCALLBACK));
|
||||
pcallback = (ASDBCALLBACK *)callocMustSucceed(
|
||||
1,sizeof(ASDBCALLBACK),"asSubInit");
|
||||
precord->dpvt = (void *)pcallback;
|
||||
callbackSetCallback(myCallback,&pcallback->callback);
|
||||
callbackSetUser(precord,&pcallback->callback);
|
||||
|
||||
@@ -225,7 +225,7 @@ static int myParse(ASINPUTFUNCPTR inputfunction)
|
||||
if (!FirstFlag) {
|
||||
line_num=1;
|
||||
yyFailed = FALSE;
|
||||
yyreset(NULL);
|
||||
yyreset();
|
||||
yyrestart(NULL);
|
||||
}
|
||||
FirstFlag = 0;
|
||||
|
||||
@@ -19,16 +19,14 @@ of this distribution.
|
||||
* .01 10-15-93 mrk Initial Implementation
|
||||
*/
|
||||
|
||||
#ifdef vxWorks
|
||||
#include <vxWorks.h>
|
||||
#include <taskLib.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "dbDefs.h"
|
||||
#include "cantProceed.h"
|
||||
#include "osiSem.h"
|
||||
#include "epicsPrint.h"
|
||||
#include "gpHash.h"
|
||||
#include "freeList.h"
|
||||
@@ -37,16 +35,9 @@ of this distribution.
|
||||
#include <errMdef.h>
|
||||
#include <ellLib.h>
|
||||
|
||||
#ifdef vxWorks
|
||||
#include <semLib.h>
|
||||
static SEM_ID asLock;
|
||||
#define LOCK semTake(asLock,WAIT_FOREVER)
|
||||
#define UNLOCK semGive(asLock);
|
||||
#else
|
||||
/*This only works in a single threaded environment */
|
||||
#define LOCK
|
||||
#define UNLOCK
|
||||
#endif
|
||||
static semId asLock;
|
||||
#define LOCK semMutexTakeAssert(asLock)
|
||||
#define UNLOCK semMutexGive(asLock)
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "shareLib.h"
|
||||
@@ -105,13 +96,10 @@ long epicsShareAPI asInitialize(ASINPUTFUNCPTR inputfunction)
|
||||
HAGNAME *phagname;
|
||||
|
||||
if(asLockInit) {
|
||||
#ifdef vxWorks
|
||||
asLock = semMCreate(SEM_DELETE_SAFE|SEM_INVERSION_SAFE|SEM_Q_PRIORITY);
|
||||
asLock = semMutexCreate();
|
||||
if(!asLock) {
|
||||
errMessage(0,"asInitialize semMCreate failed\n");
|
||||
exit(-1);
|
||||
cantProceed("asInitialize semMCreate failed\n");
|
||||
}
|
||||
#endif
|
||||
asLockInit = FALSE;
|
||||
}
|
||||
LOCK;
|
||||
@@ -809,14 +797,8 @@ void * asCalloc(size_t nobj,size_t size)
|
||||
{
|
||||
void *p;
|
||||
|
||||
p=calloc(nobj,size);
|
||||
if(p) return(p);
|
||||
#ifdef vxWorks
|
||||
taskSuspend(0);
|
||||
#else
|
||||
abort();
|
||||
#endif
|
||||
return(NULL);
|
||||
p=callocMustSucceed(nobj,size,"asCalloc");
|
||||
return(p);
|
||||
}
|
||||
|
||||
static long asAddMemberPvt(ASMEMBERPVT *pasMemberPvt,char *asgName)
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
|
||||
TOP=../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
INC := cvtTable.h
|
||||
|
||||
SRCS := makeBpt.c
|
||||
PROD := makeBpt
|
||||
|
||||
MENUS += menuConvert.h
|
||||
|
||||
BPTS += bptTypeJdegC.dbd
|
||||
BPTS += bptTypeJdegF.dbd
|
||||
BPTS += bptTypeKdegC.dbd
|
||||
BPTS += bptTypeKdegF.dbd
|
||||
|
||||
bptLibrary_SRCS = cvtBpt.c
|
||||
|
||||
IOC_LIBRARY_vxWorks = bptLibrary
|
||||
|
||||
include $(TOP)/configure/RULES_BUILD
|
||||
|
||||
$(BPTS): $(EPICS_BASE_HOST_BIN)/makeBpt$(EXE)
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
INC := cvtTable.h
|
||||
|
||||
SRCS := makeBpt.c
|
||||
PROD := makeBpt
|
||||
|
||||
MENUS += menuConvert.h
|
||||
|
||||
BPTS += bptTypeJdegC.dbd
|
||||
BPTS += bptTypeJdegF.dbd
|
||||
BPTS += bptTypeKdegC.dbd
|
||||
BPTS += bptTypeKdegF.dbd
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
|
||||
$(BPTS): $(INSTALL_PROD)
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
MENUS += menuConvert.h
|
||||
|
||||
BPTS += bptTypeJdegC.dbd
|
||||
BPTS += bptTypeJdegF.dbd
|
||||
BPTS += bptTypeKdegC.dbd
|
||||
BPTS += bptTypeKdegF.dbd
|
||||
|
||||
|
||||
SRCS.c = \
|
||||
../cvtBpt.c
|
||||
|
||||
LIBOBJS = \
|
||||
cvtBpt.o
|
||||
|
||||
LIBNAME = pbtLib
|
||||
|
||||
include $(TOP)/config/RULES.Vx
|
||||
|
||||
@@ -32,17 +32,15 @@
|
||||
* -----------------
|
||||
* 01 04OCT95 mrk Taken from old bldCvtTable
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <ellLib.h>
|
||||
#include <dbBase.h>
|
||||
#include <dbStaticLib.h>
|
||||
#include <cvtTable.h>
|
||||
#include <epicsPrint.h>
|
||||
#include "ellLib.h"
|
||||
#include "dbBase.h"
|
||||
#include "dbStaticLib.h"
|
||||
#include "cvtTable.h"
|
||||
#include "epicsPrint.h"
|
||||
|
||||
extern struct dbBase *pdbbase;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user