removed os specific code

This commit is contained in:
Jeff Hill
1996-08-13 23:16:23 +00:00
parent ea0ff36f65
commit 5ca9baaede
3 changed files with 19 additions and 26 deletions

View File

@@ -32,6 +32,9 @@
/************************************************************************/
/* $Log$
* Revision 1.55 1996/08/05 19:21:26 jhill
* removed unused proto
*
* Revision 1.54 1996/06/20 21:43:15 jhill
* restored io_done_sem (removed by cleanup)
*
@@ -473,7 +476,6 @@ struct ca_static{
int ca_event_tid;
int ca_tid;
int recv_tid;
unsigned ca_local_ticks;
#endif
};

View File

@@ -219,11 +219,6 @@ static char *os_depenhSccsId = "$Id$";
#define LOCAL static
#endif
/* delay for when a poll is used */
/* NOTE: DELAYTICKS must be less than TICKSPERSEC */
#define DELAYTICKS 50L /* (adjust units below) */
#define TICKSPERSEC 1000L /* mili sec per sec */
/*
* BSD prototypes missing from SUNOS4, MULTINET and
* perhaps other environments
@@ -231,14 +226,6 @@ static char *os_depenhSccsId = "$Id$";
#include <epicsTypes.h>
#include <bsdProto.h>
/*
* order of ops is important here
*
* NOTE: large OS dependent SYFREQ might cause an overflow
*/
#define LOCALTICKS ((SYSFREQ*DELAYTICKS)/TICKSPERSEC)
#if defined(vxWorks)
# define VXTASKIDNONE 0
# define LOCK semTake(client_lock, WAIT_FOREVER);
@@ -256,8 +243,6 @@ static char *os_depenhSccsId = "$Id$";
# define socket_ioctl(A,B,C) ioctl(A,B,(int)C)
# define MYERRNO (errnoGet()&0xffff)
# define POST_IO_EV semGive(io_done_sem)
# define SYSFREQ ((long) sysClkRateGet()) /* usually 60 Hz */
# define time(A) (tickGet()/SYSFREQ)
typedef int SOCKET;
# define INVALID_SOCKET (-1)
#endif
@@ -272,7 +257,6 @@ static char *os_depenhSccsId = "$Id$";
# define socket_ioctl(A,B,C) ioctl(A,B,C)
# define MYERRNO errno
# define POST_IO_EV
# define SYSFREQ 1000000L /* 1 MHz */
typedef int SOCKET;
# define INVALID_SOCKET (-1)
#endif
@@ -298,7 +282,6 @@ static char *os_depenhSccsId = "$Id$";
# endif
# endif
# define POST_IO_EV
# define SYSFREQ 10000000L /* 10 MHz */
# define LOCK
# define UNLOCK
# define LOCKEVENTS
@@ -326,7 +309,6 @@ static char *os_depenhSccsId = "$Id$";
# define socket_ioctl(A,B,C) ioctlsocket(A,B,C)
# define MYERRNO WSAGetLastError()
# define POST_IO_EV
# define SYSFREQ 1000000L /* 1 MHz */
#endif /*WIN32*/

View File

@@ -59,6 +59,16 @@ LOCAL int cac_add_task_variable (struct ca_static *ca_temp);
LOCAL void deleteCallBack(CALLBACK *pcb);
LOCAL void ca_check_for_fp();
/*
* order of ops is important here
*
* NOTE: large OS dependent SYFREQ might cause an overflow
* NOTE: POLLDELAY must be less than TICKSPERSEC
*/
#define POLLDELAY 50 /* milli sec */
#define TICKSPERSEC 1000 /* milli sec per sec */
#define LOCALTICKS ((sysClkRateGet()*POLLDELAY)/TICKSPERSEC)
/*
@@ -110,8 +120,8 @@ void cac_gettimeval(struct timeval *pt)
void cac_block_for_io_completion(struct timeval *pTV)
{
struct timeval itimeout;
unsigned long ticks;
unsigned long rate = sysClkRateGet();
int ticks;
int rate = sysClkRateGet();
#ifdef NOASYNCRECV
cac_mux_io(pTV);
@@ -124,7 +134,7 @@ void cac_block_for_io_completion(struct timeval *pTV)
itimeout.tv_sec = 0;
cac_mux_io(&itimeout);
ticks = pTV->tv_sec*rate + (pTV->tv_usec*rate)/USEC_PER_SEC;
ticks = (int) (pTV->tv_sec*rate + (pTV->tv_usec*rate)/USEC_PER_SEC);
ticks = min(LOCALTICKS, ticks);
semTake(io_done_sem, ticks);
@@ -178,8 +188,8 @@ void os_specific_sg_io_complete(CASG *pcasg)
void cac_block_for_sg_completion(CASG *pcasg, struct timeval *pTV)
{
struct timeval itimeout;
unsigned long ticks;
unsigned long rate = sysClkRateGet();
int ticks;
int rate = sysClkRateGet();
#ifdef NOASYNCRECV
cac_mux_io(pTV);
@@ -192,7 +202,7 @@ void cac_block_for_sg_completion(CASG *pcasg, struct timeval *pTV)
itimeout.tv_sec = 0;
cac_mux_io(&itimeout);
ticks = pTV->tv_sec*rate + (pTV->tv_usec*rate)/USEC_PER_SEC;
ticks = (int) (pTV->tv_sec*rate + (pTV->tv_usec*rate)/USEC_PER_SEC);
ticks = min(LOCALTICKS, ticks);
semTake (pcasg->sem, ticks);
@@ -346,7 +356,6 @@ int cac_os_depen_init(struct ca_static *pcas)
ellInit(&pcas->ca_putNotifyQue);
pcas->ca_tid = taskIdSelf();
pcas->ca_local_ticks = LOCALTICKS;
pcas->ca_client_lock = semMCreate(SEM_DELETE_SAFE);
assert(pcas->ca_client_lock);
pcas->ca_event_lock = semMCreate(SEM_DELETE_SAFE);