This commit is contained in:
Jeff Hill
1998-09-24 21:22:56 +00:00
parent 3801cf0b81
commit ef42291613
3 changed files with 22 additions and 25 deletions

View File

@@ -134,19 +134,15 @@ int cac_select_io (struct timeval *ptimeout, int flags)
* windows sockets and UNIX sockets implementation
* of select()
*/
if (ptimeout->tv_sec!=0 ||
ptimeout->tv_usec!=0 ) {
if ( ptimeout->tv_sec!=0 || ptimeout->tv_usec!=0 ) {
osiSleep (ptimeout->tv_sec, ptimeout->tv_usec);
}
status = 0;
}
else {
status = select(
maxfd+1,
&pfdi->readMask,
&pfdi->writeMask,
NULL,
&autoTimeOut);
status = select (maxfd+1, &pfdi->readMask, &pfdi->writeMask,
NULL, &autoTimeOut);
if (status<0) {
int errnoCpy = SOCKERRNO;

View File

@@ -232,7 +232,7 @@ LOCAL void test (
printf ("\tasync get test\n");
timeIt (test_get, pItems, iterations);
printf ("\tsynch get test\n");
timeIt (test_wait, pItems, iterations);
timeIt (test_wait, pItems, iterations/100);
}
@@ -329,13 +329,11 @@ unsigned iterations,
unsigned *pInlineIter
)
{
ti *pi;
int status;
unsigned i;
int status;
for (pi=pItems; pi<&pItems[iterations]; pi++) {
status = ca_search (
pi->name,
&pi->chix);
for (i=0u; i<iterations; i++) {
status = ca_search (pItems[i].name, &pItems[i].chix);
SEVCHK (status, NULL);
}
status = ca_pend_io(0.0);
@@ -354,13 +352,11 @@ unsigned iterations,
unsigned *pInlineIter
)
{
ti *pi;
int status;
unsigned i;
int status;
for (pi=pItems; pi<&pItems[iterations]; pi++) {
status = ca_search (
pi->name,
&pi->chix);
for (i=0u; i<iterations; i++) {
status = ca_search (pItems[i].name, &pItems[i].chix);
SEVCHK (status, NULL);
status = ca_pend_io(0.0);
SEVCHK (status, NULL);
@@ -379,13 +375,15 @@ unsigned iterations,
unsigned *pInlineIter
)
{
ti *pi;
int status;
int status;
unsigned i;
for (pi=pItems; pi<&pItems[iterations]; pi++) {
status = ca_clear_channel (pi->chix);
for (i=0u; i<iterations; i++) {
status = ca_clear_channel (pItems[i].chix);
SEVCHK (status, NULL);
}
status = ca_flush_io();
SEVCHK (status, NULL);
*pInlineIter = 1;
}

View File

@@ -756,6 +756,9 @@ LOCAL void verifyChanAndDisconnect(IIU *piiu, enum channel_state state)
/*
* need to move the channel back to the cast IIU
* (so we will be able to reconnect)
*
* this marks the IIU for disconnect if the channel
* count goes to zero
*/
cacDisconnectChannel(chan);
UNLOCK;