Files
epics-base/src/ca/conn.c
1990-11-18 21:47:01 +00:00

88 lines
2.0 KiB
C
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/************************************************************************/
/* */
/* L O S A L A M O S */
/* Los Alamos National Laboratory */
/* Los Alamos, New Mexico 87545 */
/* */
/* Copyright, 1986, The Regents of the University of California. */
/* */
/* */
/* History */
/* ------- */
/* */
/* Date Programmer Comments */
/* ---- ---------- -------- */
/* 6/89 Jeff Hill Init Release */
/* */
/*_begin */
/************************************************************************/
/* */
/* Title: IOC connection automation */
/* File: atcs:[ca]access.c */
/* Environment: VMS, UNIX, VRTX */
/* Equipment: VAX, SUN, VME */
/* */
/* */
/* */
/************************************************************************/
/*_end */
#include <vxWorks.h>
#include <cadef.h>
#include <db_access.h>
#include <iocmsg.h>
#include <iocinf.h>
chid_retry(silent)
char silent;
{
register chid chix;
register unsigned int retry_cnt = 0;
char string[100];
void send_msg();
if(!chidlist_pend.count)
return ECA_NORMAL;
LOCK;
chix = (chid) &chidlist_pend;
while(chix = (chid) chix->node.next){
build_msg(chix,TRUE);
retry_cnt++;
if(!silent)
ca_signal(ECA_CHIDNOTFND, chix+1);
}
send_msg();
printf("Sent ");
UNLOCK;
if(retry_cnt && !silent){
sprintf(string, "%d channels outstanding", retry_cnt);
ca_signal(ECA_CHIDRETRY, string);
}
return ECA_NORMAL;
}
/*
Locks must be applied while in this routine
*/
mark_chids_disconnected(iocix)
register unsigned iocix;
{
register chid chix;
register chid nextchix;
nextchix = (chid) &chidlist_conn.node;
while(chix = nextchix){
nextchix = (chid) chix->node.next;
if(chix->iocix == iocix){
lstDelete(&chidlist_conn, chix);
lstAdd(&chidlist_pend, chix);
chix->type = TYPENOTCONN;
}
}
}