From c93596af95f597e11b7e772037816e31ad5b5f23 Mon Sep 17 00:00:00 2001 From: isaac Date: Mon, 14 Jul 2008 22:14:19 +0000 Subject: [PATCH] - on returning -EBUSY in LNetEQFree, print eq_refcount which is a useful piece of debug information. --- lnet/lnet/lib-eq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lnet/lnet/lib-eq.c b/lnet/lnet/lib-eq.c index 35801a4..83c841a 100644 --- a/lnet/lnet/lib-eq.c +++ b/lnet/lnet/lib-eq.c @@ -102,6 +102,8 @@ LNetEQFree(lnet_handle_eq_t eqh) } if (eq->eq_refcount != 0) { + CDEBUG(D_NET, "Event queue (%d) busy on destroy.\n", + eq->eq_refcount); LNET_UNLOCK(); return (-EBUSY); } @@ -295,7 +297,7 @@ LNetEQPoll (lnet_handle_eq_t *eventqs, int neq, int timeout_ms, gettimeofday(&then, NULL); ts.tv_sec = then.tv_sec + timeout_ms/1000; - ts.tv_nsec = then.tv_usec * 1000 + + ts.tv_nsec = then.tv_usec * 1000 + (timeout_ms%1000) * 1000000; if (ts.tv_nsec >= 1000000000) { ts.tv_sec++; -- 1.8.3.1