diff --git a/src/as/Makefile b/src/as/Makefile index 4ae4154b5..f072dd792 100644 --- a/src/as/Makefile +++ b/src/as/Makefile @@ -1,8 +1,9 @@ TOP=../.. include $(TOP)/configure/CONFIG -INC += asDbLib.h INC += asLib.h +INC += asDbLib.h +INC += asCa.h LIBSRCS += asLib.c diff --git a/src/as/asCa.c b/src/as/asCa.c index 61fea16f3..eda13dde3 100644 --- a/src/as/asCa.c +++ b/src/as/asCa.c @@ -25,21 +25,24 @@ of this distribution. #include #include "dbDefs.h" +#include "ellLib.h" #include "osiThread.h" #include "osiSem.h" #include "cantProceed.h" #include "errlog.h" #include "taskwd.h" -#include "asDbLib.h" +#include "callback.h" #include "cadef.h" #include "caerr.h" #include "caeventmask.h" #include "alarm.h" #define epicsExportSharedSymbols +#include "asLib.h" +#include "asDbLib.h" +#include "asCa.h" -int asCaDebug = 0; -epicsShareDef ASBASE volatile *pasbase; +epicsShareDef int asCaDebug = 0; LOCAL int firstTime = TRUE; LOCAL threadId threadid=0; LOCAL int caInitializing=FALSE; @@ -207,7 +210,7 @@ LOCAL void asCaTask(void) } } -void asCaStart(void) +void epicsShareAPI asCaStart(void) { if(asCaDebug) printf("asCaStart called\n"); if(firstTime) { @@ -231,7 +234,7 @@ void asCaStart(void) semMutexGive(asCaTaskLock); } -void asCaStop(void) +void epicsShareAPI asCaStop(void) { if(threadid==0) return; if(asCaDebug) printf("asCaStop called\n"); diff --git a/src/as/asCa.h b/src/as/asCa.h new file mode 100644 index 000000000..d6eae833c --- /dev/null +++ b/src/as/asCa.h @@ -0,0 +1,21 @@ +/* asCa.h */ +/***************************************************************** + COPYRIGHT NOTIFICATION +***************************************************************** + +(C) COPYRIGHT 1993 UNIVERSITY OF CHICAGO + +This software was developed under a United States Government license +described on the COPYRIGHT_UniversityOfChicago file included as part +of this distribution. +**********************************************************************/ + +#ifndef INCasCah +#define INCasCah + +#include "shareLib.h" +epicsShareFunc void epicsShareAPI asCaStart(void); +epicsShareFunc void epicsShareAPI asCaStop(void); +epicsShareExtern int asCaDebug; + +#endif /*INCasCah*/ diff --git a/src/as/asDbLib.c b/src/as/asDbLib.c index 9b834afee..15b9d7c83 100644 --- a/src/as/asDbLib.c +++ b/src/as/asDbLib.c @@ -30,13 +30,19 @@ of this distribution. #include "taskwd.h" #include "alarm.h" #include "caeventmask.h" +#include "callback.h" #include "dbStaticLib.h" +#include "tsStamp.h" +#include "dbAddr.h" #include "dbAccess.h" +#include "db_field_log.h" #include "dbEvent.h" -#include "asLib.h" -#include "asDbLib.h" #include "dbCommon.h" #include "recSup.h" +#define epicsExportSharedSymbols +#include "asLib.h" +#include "asCa.h" +#include "asDbLib.h" static char *pacf=NULL; static char *psubstitutions=NULL; @@ -69,7 +75,7 @@ static long asDbAddRecords(void) return(0); } -int asSetFilename(char *acf) +int epicsShareAPI asSetFilename(char *acf) { if(pacf) free ((void *)pacf); if(acf) { @@ -85,7 +91,7 @@ int asSetFilename(char *acf) return(0); } -int asSetSubstitutions(char *substitutions) +int epicsShareAPI asSetSubstitutions(char *substitutions) { if(psubstitutions) free ((void *)psubstitutions); if(substitutions) { @@ -162,7 +168,7 @@ static void asInitTask(ASDBCALLBACK *pcallback) } } -int asInitAsyn(ASDBCALLBACK *pcallback) +int epicsShareAPI asInitAsyn(ASDBCALLBACK *pcallback) { if(!pacf) return(0); if(asInitTheadId) { @@ -188,7 +194,7 @@ int asInitAsyn(ASDBCALLBACK *pcallback) return(0); } -int asDbGetAsl(void *paddress) +int epicsShareAPI asDbGetAsl(void *paddress) { DBADDR *paddr = paddress; dbFldDes *pflddes; @@ -197,7 +203,7 @@ int asDbGetAsl(void *paddress) return((int)pflddes->as_level); } -ASMEMBERPVT asDbGetMemberPvt(void *paddress) +ASMEMBERPVT epicsShareAPI asDbGetMemberPvt(void *paddress) { DBADDR *paddr = paddress; dbCommon *precord; @@ -253,32 +259,32 @@ static void myMemberCallback(ASMEMBERPVT memPvt) if(precord) printf(" Record:%s",precord->name); } -int asdbdump(void) +int epicsShareAPI asdbdump(void) { asDump(myMemberCallback,NULL,1); return(0); } -int aspuag(char *uagname) +int epicsShareAPI aspuag(char *uagname) { asDumpUag(uagname); return(0); } -int asphag(char *hagname) +int epicsShareAPI asphag(char *hagname) { asDumpHag(hagname); return(0); } -int asprules(char *asgname) +int epicsShareAPI asprules(char *asgname) { asDumpRules(asgname); return(0); } -int aspmem(char *asgname,int clients) +int epicsShareAPI aspmem(char *asgname,int clients) { asDumpMem(asgname,myMemberCallback,clients); return(0); diff --git a/src/as/asDbLib.h b/src/as/asDbLib.h index 11699d864..66b281eef 100644 --- a/src/as/asDbLib.h +++ b/src/as/asDbLib.h @@ -20,25 +20,21 @@ of this distribution. #ifndef INCdbAsLibh #define INCdbAsLibh -#include -#include typedef struct { CALLBACK callback; long status; } ASDBCALLBACK; -int asSetFilename(char *acf); -int asSetSubstitutions(char *substitutions); -int asInitAsyn(ASDBCALLBACK *pcallback); -int asDbGetAsl( void *paddr); -ASMEMBERPVT asDbGetMemberPvt( void *paddr); -int asdbdump( void); -int aspuag(char *uagname); -int asphag(char *hagname); -int asprules(char *asgname); -int aspmem(char *asgname,int clients); -void asCaStart(void); -void asCaStop(void); +epicsShareFunc int epicsShareAPI asSetFilename(char *acf); +epicsShareFunc int epicsShareAPI asSetSubstitutions(char *substitutions); +epicsShareFunc int epicsShareAPI asInitAsyn(ASDBCALLBACK *pcallback); +epicsShareFunc int epicsShareAPI asDbGetAsl( void *paddr); +epicsShareFunc ASMEMBERPVT epicsShareAPI asDbGetMemberPvt( void *paddr); +epicsShareFunc int epicsShareAPI asdbdump( void); +epicsShareFunc int epicsShareAPI aspuag(char *uagname); +epicsShareFunc int epicsShareAPI asphag(char *hagname); +epicsShareFunc int epicsShareAPI asprules(char *asgname); +epicsShareFunc int epicsShareAPI aspmem(char *asgname,int clients); #endif /*INCdbAsLibh*/ diff --git a/src/as/asLib.h b/src/as/asLib.h index e9f53ebc4..771350676 100644 --- a/src/as/asLib.h +++ b/src/as/asLib.h @@ -19,11 +19,7 @@ of this distribution. #ifndef INCasLibh #define INCasLibh -#include -#include -#include -#include -#include +#include "shareLib.h" typedef struct asgMember *ASMEMBERPVT; typedef struct asgClient *ASCLIENTPVT; @@ -110,6 +106,7 @@ typedef struct asBase{ ELLLIST asgList; void *phash; } ASBASE; + epicsShareExtern volatile ASBASE *pasbase; /*Defs for User Access Groups*/ diff --git a/src/as/asLibRoutines.c b/src/as/asLibRoutines.c index d210b7f6a..c8c6aff08 100644 --- a/src/as/asLibRoutines.c +++ b/src/as/asLibRoutines.c @@ -25,6 +25,7 @@ of this distribution. #include #include "dbDefs.h" +#include "ellLib.h" #include "cantProceed.h" #include "osiSem.h" #include "epicsPrint.h" @@ -32,8 +33,8 @@ of this distribution. #include "freeList.h" #include "macLib.h" #include "postfix.h" -#include -#include +#include "errlog.h" +#include "ellLib.h" static semMutexId asLock; #define LOCK semMutexMustTake(asLock) @@ -42,13 +43,14 @@ static semMutexId asLock; #define epicsExportSharedSymbols #include "asLib.h" -static int asLockInit=TRUE; -epicsShareDef int asActive = FALSE; -static void *freeListPvt = NULL; - /*following must be global because asCa nneeds it*/ epicsShareDef ASBASE volatile *pasbase=NULL; static ASBASE *pasbasenew=NULL; +epicsShareDef int asActive = FALSE; + +static int asLockInit=TRUE; +static void *freeListPvt = NULL; + #define RPCL_LEN 184 #define DEFAULT "DEFAULT"