From 0839a9c3135a4c76e5629d35cbda031f90cdc45d Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 4 Oct 2019 09:59:59 -0700 Subject: [PATCH] btl/usnic: s/get_nsec/get_nticks/g Rename "get_nsec()" to "get_ticks()" to more accurately reflect that this function has no correlation to wall clock time at all. Signed-off-by: Jeff Squyres (cherry picked from commit ce2910a28aea61043b81324c67999f3a47cfe7ac) --- opal/mca/btl/usnic/btl_usnic.h | 2 +- opal/mca/btl/usnic/btl_usnic_module.c | 2 +- opal/mca/btl/usnic/btl_usnic_recv.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opal/mca/btl/usnic/btl_usnic.h b/opal/mca/btl/usnic/btl_usnic.h index e8f6dafa2d..d25d6309bb 100644 --- a/opal/mca/btl/usnic/btl_usnic.h +++ b/opal/mca/btl/usnic/btl_usnic.h @@ -68,7 +68,7 @@ extern uint64_t opal_btl_usnic_ticks; extern opal_recursive_mutex_t btl_usnic_lock; static inline uint64_t -get_nsec(void) +get_ticks(void) { return opal_btl_usnic_ticks; } diff --git a/opal/mca/btl/usnic/btl_usnic_module.c b/opal/mca/btl/usnic/btl_usnic_module.c index ba0442c43c..2c3d8e0463 100644 --- a/opal/mca/btl/usnic/btl_usnic_module.c +++ b/opal/mca/btl/usnic/btl_usnic_module.c @@ -1236,7 +1236,7 @@ opal_btl_usnic_module_progress_sends( /* Is it time to send ACK? */ if (endpoint->endpoint_acktime == 0 || - endpoint->endpoint_acktime <= get_nsec()) { + endpoint->endpoint_acktime <= get_ticks()) { if (OPAL_LIKELY(opal_btl_usnic_ack_send(module, endpoint) == OPAL_SUCCESS)) { opal_btl_usnic_remove_from_endpoints_needing_ack(endpoint); } else { diff --git a/opal/mca/btl/usnic/btl_usnic_recv.h b/opal/mca/btl/usnic/btl_usnic_recv.h index 7e056e488d..256132f4b5 100644 --- a/opal/mca/btl/usnic/btl_usnic_recv.h +++ b/opal/mca/btl/usnic/btl_usnic_recv.h @@ -114,7 +114,7 @@ opal_btl_usnic_update_window( /* give this process a chance to send something before ACKing */ if (0 == endpoint->endpoint_acktime) { - endpoint->endpoint_acktime = get_nsec() + 50000; /* 50 usec */ + endpoint->endpoint_acktime = get_ticks() + 50000; } /* Save this incoming segment in the received segmentss array on the