On Mon, Nov 13, 2017 at 04:25:04PM -0500, Michael J. Ruhl wrote: Sorry, noticed a few more wonky things: > #define event_signal(e) pthread_cond_signal(&(e)->cond) > #define ONE_SEC_IN_NSEC 1000000000 That should be 1000000000ULL so math doesn't accidental truncate > + clock_gettime(CLOCK_MONOTONIC, &wait); > + wait.tv_sec = wait.tv_sec + ((unsigned) timeout) / 1000; > + wait.tv_nsec = (wait.tv_nsec + (((unsigned) timeout) % 1000) * 1000000); Why the odd casts to (unsigned) ? That should be (unsigned int) > - return (uint64_t) curtime.tv_sec * 1000000 + (uint64_t) curtime.tv_usec; > + struct timespec t; > + clock_gettime(CLOCK_MONOTONIC, &t); > + return ((uint64_t)t.tv_sec * ONE_SEC_IN_NSEC + (uint64_t)t.tv_nsec) / 1000; These casts to uint64_t are also wrong, time is technically signed. The change to ONE_SEC_IN_NSEC should remove the need for the casting. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html