LNET_LOCK();
for (;;) {
+#ifndef __KERNEL__
+ LNET_UNLOCK();
+
+ /* Recursion breaker */
+ if (the_lnet.ln_rc_state == LNET_RC_STATE_RUNNING &&
+ !LNetHandleIsEqual(eventqs[0], the_lnet.ln_rc_eqh))
+ lnet_router_checker();
+
+ LNET_LOCK();
+#endif
for (i = 0; i < neq; i++) {
lnet_eq_t *eq = lnet_handle2eq(&eventqs[i]);
cfs_waitq_timedwait(&wl, CFS_TASK_INTERRUPTIBLE,
cfs_time_seconds(timeout_ms)/1000);
cfs_duration_usec(cfs_time_sub(cfs_time_current(), now),
- &tv);
- timeout_ms -= tv.tv_sec * 1000 + tv.tv_usec / 1000;
+ &tv);
+ timeout_ms -= (int)(tv.tv_sec * 1000 + tv.tv_usec / 1000);
if (timeout_ms < 0)
timeout_ms = 0;
}