[DAPL2] DAPL Counters & 2.0.3 extensions to support counter retrieval.
[mirror/winof/.git] / ulp / dapl2 / dapl / common / dapl_evd_dequeue.c
index 95fa5fa..48a3c10 100644 (file)
@@ -75,7 +75,6 @@ DAT_RETURN DAT_API dapl_evd_dequeue (
                  "dapl_evd_dequeue (%p, %p)\n",\r
                  evd_handle, \r
                  event);\r
-    DAPL_CNTR(DCNT_EVD_DEQUEUE);\r
 \r
     evd_ptr = (DAPL_EVD *)evd_handle;\r
     dat_status = DAT_SUCCESS;\r
@@ -91,6 +90,7 @@ DAT_RETURN DAT_API dapl_evd_dequeue (
        dat_status = DAT_ERROR (DAT_INVALID_PARAMETER,DAT_INVALID_ARG2);\r
        goto bail;\r
     }\r
+    DAPL_CNTR(evd_ptr, DCNT_EVD_DEQUEUE);\r
 \r
     /*\r
      * We need to dequeue under lock, as the IB OS Access API\r
@@ -122,17 +122,18 @@ DAT_RETURN DAT_API dapl_evd_dequeue (
        *event = *local_event;\r
        dat_status = dapls_rbuf_add (&evd_ptr->free_event_queue, \r
                                     local_event);\r
-       DAPL_CNTR(DCNT_EVD_DEQUEUE_FOUND);\r
+       DAPL_CNTR(evd_ptr, DCNT_EVD_DEQUEUE_FOUND);\r
+\r
     }\r
     else if (evd_ptr->ib_cq_handle != IB_INVALID_HANDLE)\r
     {\r
        dat_status = dapls_evd_cq_poll_to_event(evd_ptr, event);\r
-       DAPL_CNTR(DCNT_EVD_DEQUEUE_POLL);\r
+       DAPL_CNTR(evd_ptr, DCNT_EVD_DEQUEUE_POLL);\r
     }\r
     else\r
     {\r
        dat_status = DAT_ERROR (DAT_QUEUE_EMPTY,0);\r
-       DAPL_CNTR(DCNT_EVD_DEQUEUE_NOT_FOUND);\r
+       DAPL_CNTR(evd_ptr, DCNT_EVD_DEQUEUE_NOT_FOUND);\r
     }\r
 \r
     dapl_os_unlock ( &evd_ptr->header.lock );\r