win-pvdrivers

changeset 523:331f861accf0

removed debugging kdprint's
author James Harper <james.harper@bendigoit.com.au>
date Fri Dec 26 23:18:55 2008 +1100 (2008-12-26)
parents fe846ad6de4d
children abde14807545
files xenpci/xenbus.c
line diff
     1.1 --- a/xenpci/xenbus.c	Fri Dec 26 22:59:42 2008 +1100
     1.2 +++ b/xenpci/xenbus.c	Fri Dec 26 23:18:55 2008 +1100
     1.3 @@ -78,8 +78,8 @@ static void xb_write(
     1.4    PUCHAR ptr;
     1.5    ULONG remaining;
     1.6    
     1.7 -  FUNCTION_ENTER();
     1.8 -  KdPrint((__DRIVER_NAME "     len = %d\n", len));
     1.9 +  //FUNCTION_ENTER();
    1.10 +  //KdPrint((__DRIVER_NAME "     len = %d\n", len));
    1.11  
    1.12    ASSERT(len <= XENSTORE_RING_SIZE);
    1.13    /* Wait for the ring to drain to the point where we can send the
    1.14 @@ -102,7 +102,7 @@ static void xb_write(
    1.15    while (remaining)
    1.16    {
    1.17      copy_len = min(remaining, XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(prod));
    1.18 -    KdPrint((__DRIVER_NAME "     copy_len = %d\n", copy_len));
    1.19 +    //KdPrint((__DRIVER_NAME "     copy_len = %d\n", copy_len));
    1.20      memcpy((PUCHAR)xpdd->xen_store_interface->req + MASK_XENSTORE_IDX(prod), ptr, copy_len);
    1.21      prod += (XENSTORE_RING_IDX)copy_len;
    1.22      ptr += copy_len;
    1.23 @@ -113,7 +113,7 @@ static void xb_write(
    1.24    xpdd->xen_store_interface->req_prod = prod;
    1.25    EvtChn_Notify(xpdd, xpdd->xen_store_evtchn);
    1.26  
    1.27 -  FUNCTION_EXIT();
    1.28 +  //FUNCTION_EXIT();
    1.29  }
    1.30  
    1.31  /* takes and releases xb_request_mutex */
    1.32 @@ -143,9 +143,9 @@ xenbus_format_msg_reply(
    1.33    for (i = 0; i < nr_reqs; i++)
    1.34      xb_write(xpdd, req[i].data, req[i].len);
    1.35  
    1.36 -  KdPrint((__DRIVER_NAME "     waiting...\n"));
    1.37 +  //KdPrint((__DRIVER_NAME "     waiting...\n"));
    1.38    KeWaitForSingleObject(&xpdd->xb_request_complete_event, Executive, KernelMode, FALSE, NULL);
    1.39 -  KdPrint((__DRIVER_NAME "     ...done waiting\n"));
    1.40 +  //KdPrint((__DRIVER_NAME "     ...done waiting\n"));
    1.41    reply = xpdd->xb_reply;
    1.42    xpdd->xb_reply = NULL;
    1.43    ExReleaseFastMutex(&xpdd->xb_request_mutex);
    1.44 @@ -475,19 +475,18 @@ XenBus_ReadThreadProc(PVOID StartContext
    1.45    for(;;)
    1.46    {
    1.47      KeWaitForSingleObject(&xpdd->XenBus_ReadThreadEvent, Executive, KernelMode, FALSE, NULL);
    1.48 -    KdPrint((__DRIVER_NAME " +++ thread woken\n"));
    1.49 +    //Print((__DRIVER_NAME " +++ thread woken\n"));
    1.50      if (xpdd->XenBus_ShuttingDown)
    1.51      {
    1.52        KdPrint((__DRIVER_NAME "     Shutdown detected in ReadThreadProc\n"));
    1.53        PsTerminateSystemThread(0);
    1.54 -      KdPrint((__DRIVER_NAME "     ReadThreadProc still running... wtf?\n"));
    1.55      }
    1.56      while (xpdd->xen_store_interface->rsp_prod != xpdd->xen_store_interface->rsp_cons)
    1.57      {
    1.58        //KdPrint((__DRIVER_NAME "     a - Rsp_cons %d, rsp_prod %d.\n", xen_store_interface->rsp_cons, xen_store_interface->rsp_prod));
    1.59        if (xpdd->xen_store_interface->rsp_prod - xpdd->xen_store_interface->rsp_cons < sizeof(msg))
    1.60        {
    1.61 -        KdPrint((__DRIVER_NAME " +++ Message incomplete (not even a full header)\n"));
    1.62 +        //KdPrint((__DRIVER_NAME " +++ Message incomplete (not even a full header)\n"));
    1.63          break;
    1.64        }
    1.65        KeMemoryBarrier();
    1.66 @@ -495,7 +494,7 @@ XenBus_ReadThreadProc(PVOID StartContext
    1.67          MASK_XENSTORE_IDX(xpdd->xen_store_interface->rsp_cons), sizeof(msg));
    1.68        if (xpdd->xen_store_interface->rsp_prod - xpdd->xen_store_interface->rsp_cons < sizeof(msg) + msg.len)
    1.69        {
    1.70 -        KdPrint((__DRIVER_NAME " +++ Message incomplete (header but not full body)\n"));
    1.71 +        //KdPrint((__DRIVER_NAME " +++ Message incomplete (header but not full body)\n"));
    1.72          break;
    1.73        }
    1.74    
    1.75 @@ -507,7 +506,7 @@ XenBus_ReadThreadProc(PVOID StartContext
    1.76            MASK_XENSTORE_IDX(xpdd->xen_store_interface->rsp_cons),
    1.77            msg.len + sizeof(msg));
    1.78          xpdd->xen_store_interface->rsp_cons += msg.len + sizeof(msg);
    1.79 -        KdPrint((__DRIVER_NAME " +++ Setting event\n"));
    1.80 +        //KdPrint((__DRIVER_NAME " +++ Setting event\n"));
    1.81          KeSetEvent(&xpdd->xb_request_complete_event, IO_NO_INCREMENT, FALSE);
    1.82        }
    1.83        else // a watch: add to watch ring and signal watch thread
    1.84 @@ -528,7 +527,7 @@ XenBus_ReadThreadProc(PVOID StartContext
    1.85          }
    1.86          else
    1.87          {
    1.88 -          KdPrint((__DRIVER_NAME " +++ Queue full Path = %s Token = %s\n", path, token));
    1.89 +          //KdPrint((__DRIVER_NAME " +++ Queue full Path = %s Token = %s\n", path, token));
    1.90            // drop the message on the floor
    1.91            continue;
    1.92          }