Compare commits

..

15 Commits

Author SHA1 Message Date
John Winans
a60cba8671 Fixed array index for temerature reading. 1994-12-07 15:11:13 +00:00
Jeff Hill
1066acd60c doc 1994-12-07 00:34:41 +00:00
Jeff Hill
4c546a0299 allow event thread to finish at exit() by temp unlock 1994-12-07 00:33:24 +00:00
Jeff Hill
d6fe343a88 sync group leak fix 1994-12-07 00:31:59 +00:00
Jeff Hill
94c6314dc9 little endian no MIT float byte swap 1994-12-07 00:31:13 +00:00
Jeff Hill
1657a97783 removed debug 1994-12-07 00:30:44 +00:00
Jeff Hill
36fb04f13a removed debug stuff 1994-12-07 00:29:03 +00:00
Jeff Hill
2ea3005498 . 1994-12-07 00:28:18 +00:00
Jeff Hill
885e9e829f send prior to calling select() opt and vxWorks td() safe 1994-12-07 00:27:29 +00:00
Jeff Hill
5f53ebb4c2 no change 1994-12-07 00:20:58 +00:00
Jeff Hill
6bc97431bc *** empty log message *** 1994-12-07 00:19:11 +00:00
Marty Kraimer
0b50562f67 Moved code to src/libCom/envSubr 1994-12-05 14:45:34 +00:00
Marty Kraimer
523c0c37c6 Moved code for src/misc/epicsEnvParams to envSubr 1994-12-05 14:44:21 +00:00
Marty Kraimer
52eba44ac4 Print arg of yy_error 1994-12-05 14:42:41 +00:00
cvs2svn
d6aa5a4dac This commit was manufactured by cvs2svn to create tag 'R3.12.0-beta1'. 1994-11-30 15:17:08 +00:00
18 changed files with 470 additions and 213 deletions

View File

@@ -281,28 +281,45 @@ void *pext
if(extsize+sizeof(msg)>piiu->send.max_msg){
return ECA_TOLARGE;
}
while(TRUE){
struct timeval itimeout;
bytesAvailable = cacRingBufferWriteSize(&piiu->send, FALSE);
if (bytesAvailable<extsize+sizeof(msg)) {
/*
* try to send first so that we avoid the
* overhead of select() in high throughput
* situations
*/
(*piiu->sendBytes)(piiu);
bytesAvailable =
cacRingBufferWriteSize(&piiu->send, FALSE);
if(bytesAvailable>=extsize+sizeof(msg)){
break;
}
/*
* if connection drops request
* cant be completed
*/
if(!piiu->conn_up){
while(bytesAvailable<extsize+sizeof(msg)){
struct timeval itimeout;
/*
* if connection drops request
* cant be completed
*/
if(!piiu->conn_up){
UNLOCK;
return ECA_BADCHID;
}
UNLOCK;
return ECA_BADCHID;
LD_CA_TIME (SELECT_POLL, &itimeout);
cac_mux_io(&itimeout);
LOCK;
bytesAvailable = cacRingBufferWriteSize(
&piiu->send,
FALSE);
if(bytesAvailable>=extsize+sizeof(msg)){
break;
}
}
UNLOCK;
LD_CA_TIME (SELECT_POLL, &itimeout);
cac_mux_io(&itimeout);
LOCK;
}
@@ -424,23 +441,37 @@ struct extmsg **ppMsg
}
bytesAvailable = cacRingBufferWriteSize(&piiu->send, TRUE);
while(bytesAvailable<msgsize){
struct timeval itimeout;
UNLOCK;
LD_CA_TIME (SELECT_POLL, &itimeout);
cac_mux_io(&itimeout);
LOCK;
if (bytesAvailable<msgsize) {
/*
* if connection drops request
* cant be completed
* try to send first so that we avoid the
* overhead of select() in high throughput
* situations
*/
if(!piiu->conn_up){
return ECA_BADCHID;
}
(*piiu->sendBytes)(piiu);
bytesAvailable = cacRingBufferWriteSize(
&piiu->send,
TRUE);
bytesAvailable = cacRingBufferWriteSize(&piiu->send, TRUE);
while (bytesAvailable<msgsize) {
struct timeval itimeout;
/*
* if connection drops request
* cant be completed
*/
if(!piiu->conn_up){
return ECA_BADCHID;
}
UNLOCK;
LD_CA_TIME (SELECT_POLL, &itimeout);
cac_mux_io(&itimeout);
LOCK;
bytesAvailable = cacRingBufferWriteSize(
&piiu->send,
TRUE);
}
}
pmsg = (struct extmsg *) &piiu->send.buf[piiu->send.wtix];
@@ -1188,6 +1219,12 @@ void *pvalue
}
#endif
/*
* lock around io block create and list add
* so that we are not deleted without
* reclaiming the resource
*/
LOCK;
monix = caIOBlockCreate();
if (monix) {
@@ -1196,14 +1233,21 @@ void *pvalue
monix->count = count;
monix->usr_arg = pvalue;
LOCK;
ellAdd(&pend_read_list, &monix->node);
UNLOCK;
}
UNLOCK;
if (monix) {
status = issue_get_callback(monix, IOC_READ);
if (status == ECA_NORMAL) {
SETPENDRECV;
}
else {
LOCK;
ellDelete (&pend_read_list, &monix->node);
caIOBlockFree (monix);
UNLOCK;
}
}
else {
status = ECA_ALLOCMEM;
@@ -1255,8 +1299,13 @@ void *arg
}
#endif
/*
* lock around io block create and list add
* so that we are not deleted without
* reclaiming the resource
*/
LOCK;
monix = caIOBlockCreate();
if (monix) {
monix->chan = chix;
@@ -1265,11 +1314,18 @@ void *arg
monix->type = type;
monix->count = count;
LOCK;
ellAdd(&pend_read_list, &monix->node);
UNLOCK;
}
UNLOCK;
if (monix) {
status = issue_get_callback (monix, IOC_READ_NOTIFY);
if (status != ECA_NORMAL) {
LOCK;
ellDelete (&pend_read_list, &monix->node);
caIOBlockFree (monix);
UNLOCK;
}
}
else {
status = ECA_ALLOCMEM;
@@ -1428,20 +1484,8 @@ void *usrarg
return ECA_NOSUPPORT;
}
if(piiu){
monix = (evid) caIOBlockCreate();
if (!monix){
return ECA_ALLOCMEM;
}
monix->chan = chix;
monix->usr_func = pfunc;
monix->usr_arg = usrarg;
monix->type = type;
monix->count = count;
}
#ifdef vxWorks
else{
if (!piiu) {
CACLIENTPUTNOTIFY *ppn;
int size;
@@ -1513,6 +1557,26 @@ void *usrarg
}
#endif /*vxWorks*/
/*
* lock around io block create and list add
* so that we are not deleted without
* reclaiming the resource
*/
LOCK;
monix = (evid) caIOBlockCreate();
if (!monix) {
UNLOCK;
return ECA_ALLOCMEM;
}
ellAdd(&pend_write_list, &monix->node);
UNLOCK;
monix->chan = chix;
monix->usr_func = pfunc;
monix->usr_arg = usrarg;
monix->type = type;
monix->count = count;
status = issue_ca_array_put(
IOC_WRITE_NOTIFY,
monix->id,
@@ -1521,19 +1585,14 @@ void *usrarg
chix,
pvalue);
if(status != ECA_NORMAL){
if(chix->piiu){
caIOBlockFree(monix);
}
LOCK;
ellDelete (&pend_write_list, &monix->node);
caIOBlockFree(monix);
UNLOCK;
return status;
}
if(piiu){
LOCK;
ellAdd(&pend_write_list, &monix->node);
UNLOCK;
}
return status;
}
@@ -1995,30 +2054,31 @@ long mask
if(!mask)
return ECA_BADMASK;
/*
* lock around io block create and list add
* so that we are not deleted without
* reclaiming the resource
*/
LOCK;
/* event descriptor */
# ifdef vxWorks
{
if (!chix->piiu) {
# ifdef vxWorks
static int dbevsize;
if(!chix->piiu){
if(!dbevsize){
dbevsize = db_sizeof_event_block();
}
size = sizeof(*monix)+dbevsize;
if(!(monix = (evid)ellGet(&dbfree_ev_list))){
monix = (evid)malloc(size);
}
}
else{
monix = caIOBlockCreate();
}
if(!dbevsize){
dbevsize = db_sizeof_event_block();
}
size = sizeof(*monix)+dbevsize;
if(!(monix = (evid)ellGet(&dbfree_ev_list))){
monix = (evid)malloc(size);
}
# else
assert (0);
# endif
}
# else
else {
monix = caIOBlockCreate();
# endif
}
if(!monix){
UNLOCK;
@@ -2041,42 +2101,40 @@ long mask
monix->mask = mask;
# ifdef vxWorks
{
if(!chix->piiu){
status = db_add_event(
evuser,
chix->id.paddr,
ca_event_handler,
monix,
mask,
monix+1);
if(status == ERROR){
UNLOCK;
return ECA_DBLCLFAIL;
}
if(!chix->piiu){
status = db_add_event(
evuser,
chix->id.paddr,
ca_event_handler,
monix,
mask,
monix+1);
if(status == ERROR){
UNLOCK;
return ECA_DBLCLFAIL;
}
/*
* Place in the channel list
* - do it after db_add_event so there
* is no chance that it will be deleted
* at exit before it is completely created
*/
ellAdd(&chix->eventq, &monix->node);
/*
* Place in the channel list
* - do it after db_add_event so there
* is no chance that it will be deleted
* at exit before it is completely created
*/
ellAdd(&chix->eventq, &monix->node);
/*
* force event to be called at least once
* return warning msg if they have made the queue to full
* to force the first (untriggered) event.
*/
if(db_post_single_event(monix+1)==ERROR){
UNLOCK;
return ECA_OVEVFAIL;
}
/*
* force event to be called at least once
* return warning msg if they have made the queue to full
* to force the first (untriggered) event.
*/
if(db_post_single_event(monix+1)==ERROR){
UNLOCK;
return ECA_OVEVFAIL;
}
UNLOCK;
return ECA_NORMAL;
}
}
UNLOCK;
return ECA_NORMAL;
}
# endif
/* It can be added to the list any place if it is remote */
@@ -2086,7 +2144,14 @@ long mask
UNLOCK;
if(chix->state == cs_conn){
return ca_request_event(monix);
status = ca_request_event(monix);
if (status != ECA_NORMAL) {
LOCK;
ellDelete (&chix->eventq, &monix->node);
caIOBlockFree(monix);
UNLOCK
}
return status;
}
else{
return ECA_NORMAL;
@@ -2939,7 +3004,7 @@ int echo_request(struct ioc_in_use *piiu, ca_time *pCurrentTime)
struct extmsg *phdr;
status = cac_alloc_msg_no_flush (piiu, sizeof(*phdr), &phdr);
if (status) {
if (status != ECA_NORMAL) {
return status;
}

View File

@@ -9,13 +9,12 @@ static char *sccsId = "@(#) $Id$";
#include <LIB$ROUTINES.H>
#endif
#include <stdio.h>
#include <assert.h>
#include <stdio.h>
#include <assert.h>
#include "os_depen.h"
#include <cadef.h>
#include "os_depen.h"
#include <cadef.h>
#define EVENT_ROUTINE null_event
#define CONN_ROUTINE conn
@@ -75,18 +74,20 @@ int doacctst(char *pname)
chid chix2;
chid chix3;
chid chix4;
struct dbr_gr_float *ptr;
struct dbr_gr_float *pgrfloat;
struct dbr_gr_float *ptr = NULL;
struct dbr_gr_float *pgrfloat = NULL;
float *pfloat = NULL;
double *pdouble = NULL;
long status;
long i, j;
evid monix;
float *pfloat;
double *pdouble;
char pstring[NUM][MAX_STRING_SIZE];
SEVCHK(ca_task_initialize(), "Unable to initialize");
conn_get_cb_count = 0;
printf("begin\n");
#ifdef VMS
lib$init_timer();
@@ -198,8 +199,6 @@ int doacctst(char *pname)
lib$show_timer();
#endif /*VMS*/
pfloat = &ptr->value;
#ifdef VMS
lib$init_timer();
#endif /*VMS*/
@@ -298,7 +297,6 @@ int doacctst(char *pname)
printf("Skipped multiple get cb test - no read access\n");
}
if(ca_v42_ok(chix1)){
test_sync_groups(chix1);
}
@@ -413,10 +411,10 @@ int doacctst(char *pname)
&monix);
SEVCHK(status, NULL);
}
pfloat = (float *) malloc(sizeof(float) * NUM);
pdouble = (double *) malloc(sizeof(double) * NUM);
pgrfloat = (struct dbr_gr_float *) malloc(sizeof(*pgrfloat) * NUM);
pfloat = (float *) calloc(sizeof(float),NUM);
pdouble = (double *) calloc(sizeof(double),NUM);
pgrfloat = (struct dbr_gr_float *) calloc(sizeof(*pgrfloat),NUM);
if (VALID_DB_REQ(chix1->type))
if (pfloat)
@@ -482,10 +480,18 @@ int doacctst(char *pname)
SEVCHK(status, NULL);
}
free(ptr);
free(pfloat);
free(pdouble);
free(pgrfloat);
if (ptr){
free (ptr);
}
if (pfloat) {
free(pfloat);
}
if (pdouble) {
free(pdouble);
}
if (pgrfloat) {
free(pgrfloat);
}
status = ca_task_exit();
SEVCHK(status,NULL);

View File

@@ -48,6 +48,7 @@ int cac_select_io(struct timeval *ptimeout, int flags)
int maxfd;
caFDInfo *pfdi;
LOCK;
pfdi = (caFDInfo *) ellGet(&ca_static->fdInfoFreeList);
@@ -60,7 +61,6 @@ int cac_select_io(struct timeval *ptimeout, int flags)
}
}
ellAdd (&ca_static->fdInfoList, &pfdi->node);
UNLOCK;
FD_ZERO (&pfdi->readMask);
FD_ZERO (&pfdi->writeMask);
@@ -93,9 +93,7 @@ int cac_select_io(struct timeval *ptimeout, int flags)
}
}
}
pfdi->writeSave = pfdi->writeMask;
pfdi->readSave = pfdi->readMask;
UNLOCK;
#if 0
printf( "max fd=%d tv_usec=%d tv_sec=%d\n",
@@ -103,6 +101,15 @@ printf( "max fd=%d tv_usec=%d tv_sec=%d\n",
ptimeout->tv_usec,
ptimeout->tv_sec);
#endif
#if defined(vxWorks) && 0
if(client_lock->recurse>0){
ca_printf("lock is on and we are going to sleep %d!",
client_lock->recurse);
taskSuspend(0);
}
#endif
status = select(
maxfd+1,
&pfdi->readMask,
@@ -141,19 +148,7 @@ printf("leaving select stat=%d errno=%d \n", status, MYERRNO);
if (FD_ISSET(piiu->sock_chan,&pfdi->writeMask)) {
(*piiu->sendBytes)(piiu);
}
#if 0
else{
if (FD_ISSET(piiu->sock_chan, &pfdi->writeSave)) {
if(FD_ISSET(piiu->sock_chan, &pfdi->readSave) &&
!FD_ISSET(piiu->sock_chan,&pfdi->readMask)) {
printf("Still waiting to send on %d with recv empty\n", piiu->sock_chan);
}
if(!FD_ISSET(piiu->sock_chan, &pfdi->readSave)){
printf("Still waiting to send on %d with no recv wait?\n", piiu->sock_chan);
}
}
}
#endif
if (FD_ISSET(piiu->sock_chan,&pfdi->readMask)) {
(*piiu->recvBytes)(piiu);
}

View File

@@ -1556,7 +1556,7 @@ void htonf(float *pHost, float *pNet)
pIEEE->mant = mant;
pIEEE->exp = exp;
pIEEE->sign = sign;
*(ca_uint32_t *)pIEEE = ntohl(*(ca_uint32_t *)pIEEE);
*(ca_uint32_t *)pIEEE = htonl(*(ca_uint32_t *)pIEEE);
}
@@ -1570,7 +1570,7 @@ void ntohf(float *pNet, float *pHost)
struct ieeeflt *pIEEE = pNet;
long exp,mant2,mant1,sign;
*(ca_uint32_t *)pIEEE = htonl(*(ca_uint32_t *)pIEEE);
*(ca_uint32_t *)pIEEE = ntohl(*(ca_uint32_t *)pIEEE);
if( (short) pIEEE->exp > EXPMAXMIT + IEEE_SB){
sign = pIEEE->sign;
exp = EXPMAXMIT + MIT_SB;
@@ -1600,24 +1600,68 @@ void ntohf(float *pNet, float *pHost)
#ifndef CA_FLOAT_MIT
void htond(double *IEEEhost, double *IEEEnet)
/*
* htond ()
* performs only byte swapping
*/
void htond (double *IEEEhost, double *IEEEnet)
{
*IEEEnet = *IEEEhost;
ca_uint32_t *pHost = (ca_uint32_t *) IEEEhost;
ca_uint32_t *pNet = (ca_uint32_t *) IEEEnet;
ca_uint32_t tmp;
/*
* byte swap to net order
* (assume that src and dest ptrs
* may be identical)
*/
tmp = pHost[0];
pNet[0] = htonl (pHost[1]);
pNet[1] = htonl (tmp);
}
void ntohd(double *IEEEnet, double *IEEEhost)
/*
* ntohd ()
* performs only byte swapping
*/
void ntohd (double *IEEEnet, double *IEEEhost)
{
*IEEEhost = *IEEEnet;
ca_uint32_t *pHost = (ca_uint32_t *) IEEEhost;
ca_uint32_t *pNet = (ca_uint32_t *) IEEEnet;
ca_uint32_t tmp;
/*
* byte swap to net order
* (assume that src and dest ptrs
* may be identical)
*/
tmp = pNet[0];
pHost[0] = ntohl (pNet[1]);
pHost[1] = htonl (tmp);
}
void ntohf(float *IEEEnet, float *IEEEhost)
/*
* ntohf ()
* performs only byte swapping
*/
void ntohf (float *IEEEnet, float *IEEEhost)
{
*IEEEhost = *IEEEnet;
ca_uint32_t *pHost = (ca_uint32_t *) IEEEhost;
ca_uint32_t *pNet = (ca_uint32_t *) IEEEnet;
*pHost = ntohl (*pNet);
}
void htonf(float *IEEEhost, float *IEEEnet)
/*
* htonf ()
* performs only byte swapping
*/
void htonf (float *IEEEhost, float *IEEEnet)
{
*IEEEnet = *IEEEhost;
ca_uint32_t *pHost = (ca_uint32_t *) IEEEhost;
ca_uint32_t *pNet = (ca_uint32_t *) IEEEnet;
*pNet = htonl (*pHost);
}
#endif /* not CA_MIT_FLOAT*/

View File

@@ -54,6 +54,7 @@ static char *sccsId = "@(#) $Id$";
*
* Perhaps it is sufficient for this to return 127.0.0.1
* (the loop back address)
* See Below
*/
int local_addr(int s, struct sockaddr_in *plcladdr)
{
@@ -141,16 +142,46 @@ int local_addr(int s, struct sockaddr_in *plcladdr)
return OK;
}
#if 0
/*
* An alternate sloution
* for os without the if routines
*/
/*
* local_addr()
*
* return 127.0.0.1
* (the loop back address)
*/
int local_addr (int s, struct sockaddr_in *plcladdr)
{
ca_uint32_t loopBackAddress = 0x7f000001;
plcladdr->sa_family = AF_INET;
plcladdr->sin_port = 0;
plcladdr->sin_addr.s_addr = ntohl (loopBackAddress);
}
#endif
/*
* caDiscoverInterfaces()
* caDiscoverInterfaces()
*
* Load the list with the broadcast address for all
* interfaces found that support broadcast.
* This routine is provided with the address of an ELLLIST a socket
* and a destination port number. When the routine returns there
* will be one additional inet address (a caAddrNode) in the list
* for each inet interface found that is up and isnt a loop back
* interface. If the interface supports broadcast then I add its
* broadcast address to the list. If the interface is a point to
* point link then I add the destination address of the point to
* point link to the list. In either case I set the port number
* in the address node to the port supplied in the argument
* list.
*
* LOCK should be applied here for (pList)
* (this is also called from the server)
* LOCK should be applied here for (pList)
* (this is also called from the server)
*/
void caDiscoverInterfaces(ELLLIST *pList, int socket, int port)
{

View File

@@ -380,8 +380,6 @@ typedef struct {
ELLNODE node;
fd_set readMask;
fd_set writeMask;
fd_set writeSave;
fd_set readSave;
}caFDInfo;
struct ca_static{

View File

@@ -63,9 +63,10 @@
# endif
#endif
#ifndef MIT_FLOAT
#define htond(IEEEhost, IEEEnet) (*(IEEEnet) = *(IEEEhost))
#define ntohd(IEEEnet, IEEEhost) (*(IEEEhost) = *(IEEEnet))
#define htonf(IEEEhost, IEEEnet) (*(IEEEnet) = *(IEEEhost))
#define ntohf(IEEEnet, IEEEhost) (*(IEEEhost) = *(IEEEnet))
#if !defined(MIT_FLOAT) && !defined(CA_LITTLE_ENDIAN)
#define htond(IEEEhost, IEEEnet) (*(double *)(IEEEnet) = *(double *)(IEEEhost))
#define ntohd(IEEEnet, IEEEhost) (*(double *)(IEEEhost) = *(double *)(IEEEnet))
#define htonf(IEEEhost, IEEEnet) (*(float *)(IEEEnet) = *(float *)(IEEEhost))
#define ntohf(IEEEnet, IEEEhost) (*(float *)(IEEEhost) = *(float *)(IEEEnet))
#endif

View File

@@ -61,6 +61,7 @@ void ca_sg_init(void)
void ca_sg_shutdown(struct ca_static *ca_temp)
{
CASG *pcasg;
CASG *pnextcasg;
int status;
/*
@@ -69,16 +70,25 @@ void ca_sg_shutdown(struct ca_static *ca_temp)
LOCK;
pcasg = (CASG *) ellFirst (&ca_temp->activeCASG);
while (pcasg) {
status = bucketRemoveItemUnsignedId (
ca_temp->ca_pSlowBucket, &pcasg->id);
assert (status == BUCKET_SUCCESS);
pcasg = (CASG *) ellNext(&pcasg->node);
pnextcasg = (CASG *) ellNext (&pcasg->node);
status = ca_sg_delete (pcasg->id);
assert (status==ECA_NORMAL);
pcasg = pnextcasg;
}
ellFree(&ca_temp->activeCASG);
ellFree(&ca_temp->freeCASG);
assert (ellCount(&ca_temp->activeCASG)==0);
/*
* per sync group
*/
ellFree (&ca_temp->freeCASG);
/*
* per sync group op
*/
ellFree (&ca_temp->activeCASGOP);
ellFree (&ca_temp->freeCASGOP);
UNLOCK;
ellInit(&ca_temp->activeCASGOP);
ellInit(&ca_temp->freeCASGOP);
return;
}

View File

@@ -104,6 +104,10 @@ void cac_mux_io(struct timeval *ptimeout)
int count;
struct timeval timeout;
#if NOASYNCRECV
cac_clean_iiu_list();
manage_conn(TRUE);
#endif
timeout = *ptimeout;
do{
count = cac_select_io(
@@ -113,6 +117,10 @@ void cac_mux_io(struct timeval *ptimeout)
timeout.tv_sec = 0;
}
while(count>0);
#if NOASYNCRECV
ca_process_input_queue();
#endif
}
@@ -125,6 +133,9 @@ void cac_block_for_io_completion(struct timeval *pTV)
unsigned long ticks;
unsigned long rate = sysClkRateGet();
#if NOASYNCRECV
cac_mux_io(pTV);
#else
/*
* flush outputs
* (recv occurs in another thread)
@@ -137,6 +148,7 @@ void cac_block_for_io_completion(struct timeval *pTV)
ticks = min(LOCALTICKS, ticks);
semTake(io_done_sem, ticks);
#endif
}
@@ -146,7 +158,7 @@ void cac_block_for_io_completion(struct timeval *pTV)
void os_specific_sg_create(CASG *pcasg)
{
pcasg->sem = semBCreate(SEM_Q_PRIORITY, SEM_EMPTY);
assert(pcasg->sem);
assert (pcasg->sem);
}
@@ -158,7 +170,7 @@ void os_specific_sg_delete(CASG *pcasg)
int status;
status = semDelete(pcasg->sem);
assert(status == OK);
assert (status == OK);
}
@@ -170,7 +182,7 @@ void os_specific_sg_io_complete(CASG *pcasg)
int status;
status = semGive(pcasg->sem);
assert(status == OK);
assert (status == OK);
}
@@ -183,6 +195,9 @@ void cac_block_for_sg_completion(CASG *pcasg, struct timeval *pTV)
unsigned long ticks;
unsigned long rate = sysClkRateGet();
#if NOASYNCRECV
cac_mux_io(pTV);
#else
/*
* flush outputs
* (recv occurs in another thread)
@@ -194,7 +209,8 @@ void cac_block_for_sg_completion(CASG *pcasg, struct timeval *pTV)
ticks = pTV->tv_sec*rate + (pTV->tv_usec*rate)/USEC_PER_SEC;
ticks = min(LOCALTICKS, ticks);
semTake(pcasg->sem, ticks);
semTake (pcasg->sem, ticks);
#endif
}
@@ -440,14 +456,17 @@ LOCAL int cac_os_depen_exit_tid (struct ca_static *pcas, int tid)
* Cancel all local events
* (and put call backs)
*
* !! temp release lock so that the event task
* can finish !!
*/
UNLOCK;
chix = (chid) & pcas->ca_local_chidlist.node;
while (chix = (chid) chix->node.next) {
while (monix = (evid) ellGet(&chix->eventq)) {
/*
* temp release lock so that the event task
* can finish
*/
UNLOCK;
status = db_cancel_event(monix + 1);
LOCK;
assert(status == OK);
free(monix);
}
@@ -461,7 +480,6 @@ LOCAL int cac_os_depen_exit_tid (struct ca_static *pcas, int tid)
free (ppn);
}
}
LOCK;
/*
* set ca_static for access.c
@@ -841,6 +859,9 @@ void cac_recv_task(int tid)
* ca_task_exit() is called.
*/
while(TRUE){
#if NOASYNCRECV
taskDelay(60);
#else
manage_conn(TRUE);
timeout.tv_usec = 0;
@@ -853,6 +874,7 @@ void cac_recv_task(int tid)
CA_DO_RECVS);
ca_process_input_queue();
#endif
}
}

View File

@@ -128,7 +128,7 @@ junko: WORD
yyerror(str)
char *str;
{
sprintf(message,"Error line %d : %s\n",line_num, yytext);
sprintf(message,"Error line %d : %s %s\n",line_num, yytext,str);
errMessage(-1,message);
}

View File

@@ -59,6 +59,9 @@
* ...
*
* $Log$
* Revision 1.4 1994/11/30 15:10:23 winans
* Added IRQ mode stuff
*
* Revision 1.3 1994/11/17 21:11:58 winans
* Major restructuring of init code.
*
@@ -601,7 +604,7 @@ STATIC long SysmonInitMbbiRec(struct mbbiRecord *pmbbi)
/* load temperature values up */
if (!strcmp(ParmTable[3].parm_name, pvmeio->parm))
if (!strcmp(ParmTable[SYSMON_PARM_TEMP].parm_name, pvmeio->parm))
{
if (devSysmonDebug >= 10)
printf("devSysmon: mbbi record is Temperature\n");

View File

@@ -42,7 +42,6 @@
#include <bucketLib.h>
#ifndef NBBY
#define NBBY 8
#endif /* NBBY */

View File

@@ -42,7 +42,6 @@
#include <bucketLib.h>
#ifndef NBBY
#define NBBY 8
#endif /* NBBY */

View File

@@ -74,6 +74,7 @@
#define ENV_PRIVATE_DATA
#include <envDefs.h>
#include <epicsEnvParams.h>
/*+/subr**********************************************************************
@@ -378,3 +379,34 @@ char *value; /* I pointer to value string */
#endif
return 0;
}
/*parameters meant to be modified in epicsEnvParams.h*/
epicsSetEnvParams()
{
printf("setting EPICS environment parameters\n");
envSetConfigParam(&EPICS_TS_MIN_WEST, EPICS_TS_MIN_VALUE);
envSetConfigParam(&EPICS_AR_PORT, "7002");
envSetConfigParam(&EPICS_IOC_LOG_INET, EPICS_IOC_LOG_VALUE);
envSetConfigParam(&EPICS_IOC_LOG_PORT, "7004");
envSetConfigParam(&EPICS_IOC_LOG_FILE_LIMIT, EPICS_IOC_FILE_VALUE);
envSetConfigParam(&EPICS_IOC_LOG_FILE_NAME, EPICS_IOC_LOG_FILE_TXT);
return 0;
}
epicsPrtEnvParams()
{
envPrtConfigParam(&EPICS_TS_MIN_WEST);
envPrtConfigParam(&EPICS_CMD_PROTO_PORT);
envPrtConfigParam(&EPICS_AR_PORT);
envPrtConfigParam(&EPICS_IOC_LOG_INET);
envPrtConfigParam(&EPICS_IOC_LOG_PORT);
envPrtConfigParam(&EPICS_IOC_LOG_FILE_LIMIT);
envPrtConfigParam(&EPICS_IOC_LOG_FILE_NAME);
envPrtConfigParam(&EPICS_CA_ADDR_LIST);
envPrtConfigParam(&EPICS_CA_CONN_TMO);
envPrtConfigParam(&EPICS_CA_BEACON_PERIOD);
envPrtConfigParam(&EPICS_CA_AUTO_ADDR_LIST);
envPrtConfigParam(&EPICS_CA_REPEATER_PORT);
envPrtConfigParam(&EPICS_CA_SERVER_PORT);
return 0;
}

View File

@@ -74,6 +74,7 @@
#define ENV_PRIVATE_DATA
#include <envDefs.h>
#include <epicsEnvParams.h>
/*+/subr**********************************************************************
@@ -378,3 +379,34 @@ char *value; /* I pointer to value string */
#endif
return 0;
}
/*parameters meant to be modified in epicsEnvParams.h*/
epicsSetEnvParams()
{
printf("setting EPICS environment parameters\n");
envSetConfigParam(&EPICS_TS_MIN_WEST, EPICS_TS_MIN_VALUE);
envSetConfigParam(&EPICS_AR_PORT, "7002");
envSetConfigParam(&EPICS_IOC_LOG_INET, EPICS_IOC_LOG_VALUE);
envSetConfigParam(&EPICS_IOC_LOG_PORT, "7004");
envSetConfigParam(&EPICS_IOC_LOG_FILE_LIMIT, EPICS_IOC_FILE_VALUE);
envSetConfigParam(&EPICS_IOC_LOG_FILE_NAME, EPICS_IOC_LOG_FILE_TXT);
return 0;
}
epicsPrtEnvParams()
{
envPrtConfigParam(&EPICS_TS_MIN_WEST);
envPrtConfigParam(&EPICS_CMD_PROTO_PORT);
envPrtConfigParam(&EPICS_AR_PORT);
envPrtConfigParam(&EPICS_IOC_LOG_INET);
envPrtConfigParam(&EPICS_IOC_LOG_PORT);
envPrtConfigParam(&EPICS_IOC_LOG_FILE_LIMIT);
envPrtConfigParam(&EPICS_IOC_LOG_FILE_NAME);
envPrtConfigParam(&EPICS_CA_ADDR_LIST);
envPrtConfigParam(&EPICS_CA_CONN_TMO);
envPrtConfigParam(&EPICS_CA_BEACON_PERIOD);
envPrtConfigParam(&EPICS_CA_AUTO_ADDR_LIST);
envPrtConfigParam(&EPICS_CA_REPEATER_PORT);
envPrtConfigParam(&EPICS_CA_SERVER_PORT);
return 0;
}

View File

@@ -0,0 +1,18 @@
/* $Id$
* $Log$
* Revision 1.3 1994/11/01 14:55:15 jba
* set values for ANL/APS/ASD
*
* Revision 1.2 1994/09/09 12:40:30 mrk
* Removed env variables for old time support. New uses standard Unix methods.
*
* Revision 1.1 1994/07/17 07:14:24 bordua
* Initial version.
*
*/
/*These are env variables meant to be modified by each epics site*/
char *EPICS_TS_MIN_VALUE= "360";
char *EPICS_IOC_LOG_VALUE= "164.54.8.167";
char *EPICS_IOC_FILE_VALUE= "1000000";
char *EPICS_IOC_LOG_FILE_TXT= "/home/phebos1/epics/apple/log/iocLog.text";

View File

@@ -49,17 +49,14 @@
unsigned memDebugLevel = 1;
#define debugMallocMagic 0xaaaaaaaa
typedef struct debugMallocFooter{
unsigned long magic;
}DMF;
#define debugMallocMagic 0xaaaaaaaa
#define debugMallocFooter "Dont Tread On Me"
typedef struct debugMallocHeader{
ELLNODE node;
char *pFile;
char *pUser;
DMF *pFoot;
char *pFoot;
unsigned long line;
unsigned long size;
unsigned long tick;
@@ -99,14 +96,16 @@ unsigned long line;
unsigned long size;
#endif /*__STDC__*/
{
DMH *pHdr;
DMH *pHdr;
unsigned long totSize;
pHdr = (DMH *)calloc(1,sizeof(DMH)+sizeof(DMF)+size);
totSize = sizeof(DMH)+strlen(debugMallocFooter)+1+size;
pHdr = (DMH *)calloc(1, totSize);
if(!pHdr){
return NULL;
}
pHdr->pUser = (char *) (pHdr+1);
pHdr->pFoot = (DMF *) (pHdr->pUser+size);
pHdr->pFoot = (char *) (pHdr->pUser+size);
pHdr->pFile = pFile;
pHdr->line = line;
pHdr->size = size;
@@ -114,9 +113,9 @@ unsigned long size;
#ifdef vxWorks
pHdr->tick = tickGet();
#else /*vxWorks*/
pHdr->tick = 0;
pHdr->tick = clock();
#endif /*vxWorks*/
pHdr->pFoot->magic = debugMallocMagic;
strcpy (pHdr->pFoot, debugMallocFooter);
#ifdef LOCKS_REQUIRED
if(!memDebugInit){
@@ -217,7 +216,10 @@ DMH *pHdr;
return 1;
}
if(pHdr->magic != debugMallocMagic || pHdr->pFoot->magic != debugMallocMagic){
strcpy (pHdr->pFoot, debugMallocFooter);
if(pHdr->magic != debugMallocMagic ||
strcmp(pHdr->pFoot, debugMallocFooter)){
fprintf(stderr, "block overwritten %x\n",
(unsigned)pHdr->pUser);
fprintf(stderr, "malloc occured at %s.%d\n",
@@ -261,17 +263,17 @@ unsigned long ignoreBeforeThisTick;
FASTLOCK(&memDebugLock);
pHdr = (DMH *) ellFirst(&memDebugList);
while(pHdr = (DMH *) ellNext(pHdr)){
if(pHdr->tick<ignoreBeforeThisTick){
continue;
while(pHdr){
if(pHdr->tick>=ignoreBeforeThisTick){
fprintf(stderr,
"%8x = malloc(%d) at %s.%d tick=%d\n",
(unsigned) pHdr->pUser,
pHdr->size,
pHdr->pFile,
pHdr->line,
pHdr->tick);
}
fprintf(stderr,
"%8x = malloc(%d) at %s.%d tick=%d\n",
(unsigned) pHdr->pUser,
pHdr->size,
pHdr->pFile,
pHdr->line,
pHdr->tick);
pHdr = (DMH *) ellNext(pHdr);
}
FASTUNLOCK(&memDebugLock);
return 0;

View File

@@ -2,9 +2,9 @@ EPICS = ../../../..
include Target.include
include $(EPICS)/config/CONFIG_BASE
SRCS.c = ../epicsEnvParams.c ../epicsRelease.c
SRCS.c = ../epicsRelease.c
OBJS = epicsEnvParams.o epicsRelease.o
OBJS = epicsRelease.o
PROD = miscLib