net charmrun: pass actual microseconds to select
authorPhil Miller <mille121@illinois.edu>
Tue, 16 Mar 2010 01:58:49 +0000 (20:58 -0500)
committerPhil Miller <mille121@illinois.edu>
Tue, 16 Mar 2010 01:58:49 +0000 (20:58 -0500)
src/arch/net/charmrun/charmrun.c

index f7603f5067c5d4d4763b2f8e33b3918db0bdb78f..94619f53d8f201c311d40a6fcffab4b5272bc6ba 100644 (file)
@@ -1891,7 +1891,8 @@ int socket_error_in_poll(int code,const char *msg)
         fd_set rfds_sto,wfds_sto;\
         int nFds=0;  \
         fd_set *rfds=&rfds_sto,*wfds=&wfds_sto; struct timeval tmo; \
-        FD_ZERO(rfds); FD_ZERO(wfds);tmo.tv_sec=delayMs/1000; tmo.tv_usec=delayMs%1000;
+        FD_ZERO(rfds); FD_ZERO(wfds); \
+       tmo.tv_sec=delayMs/1000; tmo.tv_usec=1000*(delayMs%1000);
 # define CMK_PIPE_SUB rfds,wfds
 # define CMK_PIPE_CALL() select(FD_SETSIZE, rfds, 0, 0, &tmo)