Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
2.2 KiB

  1. /*************************************************************************
  2. *
  3. * buffer.c
  4. *
  5. * Common buffering code for all transport drivers
  6. *
  7. * Copyright 1998, Microsoft
  8. *
  9. *
  10. *************************************************************************/
  11. /*
  12. * Includes
  13. */
  14. #include <ntddk.h>
  15. #include <ntddvdeo.h>
  16. #include <ntddkbd.h>
  17. #include <ntddmou.h>
  18. #include <ntddbeep.h>
  19. #include <winstaw.h>
  20. #include <icadd.h>
  21. #include <sdapi.h>
  22. #include <td.h>
  23. /*=============================================================================
  24. == External Functions Defined
  25. =============================================================================*/
  26. VOID OutBufError( PTD, POUTBUF );
  27. VOID OutBufFree( PTD, POUTBUF );
  28. /*=============================================================================
  29. == Functions used
  30. =============================================================================*/
  31. /*******************************************************************************
  32. *
  33. * OutBufError
  34. *
  35. * This routine is used to return an output buffer to the ICA driver
  36. * free pool on an unsuccessful write or other error.
  37. *
  38. *
  39. * ENTRY:
  40. * pTd (input)
  41. * Pointer to TD data structure
  42. * pOutBuf (input)
  43. * pointer to output buffer
  44. *
  45. * EXIT:
  46. * nothing
  47. *
  48. ******************************************************************************/
  49. VOID
  50. OutBufError( PTD pTd, POUTBUF pOutBuf )
  51. {
  52. ASSERT( pOutBuf->Links.Flink == pOutBuf->Links.Blink );
  53. IcaBufferError( pTd->pContext, pOutBuf );
  54. }
  55. /*******************************************************************************
  56. *
  57. * OutBufFree
  58. *
  59. * This routine is used to return an output buffer to the up stream
  60. * stack driver. This routine should only be used when the data contained
  61. * in the output buffer was successfully written to the transport.
  62. *
  63. *
  64. * ENTRY:
  65. * pTd (input)
  66. * Pointer to TD data structure
  67. * pOutBuf (input)
  68. * pointer to output buffer
  69. *
  70. * EXIT:
  71. * nothing
  72. *
  73. ******************************************************************************/
  74. VOID
  75. OutBufFree( PTD pTd, POUTBUF pOutBuf )
  76. {
  77. ASSERT( pOutBuf->Links.Flink == pOutBuf->Links.Blink );
  78. IcaBufferFree( pTd->pContext, pOutBuf );
  79. }