wvBufferP.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:2k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* wvBufferP.h - generic buffer definition for buffers used with windview */
  2. /* Copyright 1997 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01e,06may98,cth  added nBytesRtn to BUFFER_DESC
  7. 01d,02feb98,nps  Allow inclusion in (68k) assembler source.
  8. 01c,18dec97,cth  renamed from buffer.h to wvBufferP.h, added flushRtn, comments
  9. 01b,21nov97,nps  added objCore to the start of BUFFER_DESC.
  10. 01a,16nov97,cth  written.
  11. */
  12. /*
  13. This file contains the definition of a structure that should make up the
  14. core of any buffer id that can be passed to wvLib.  Windview uses a
  15. pointer to this type of structure as a buffer id and as a way of 
  16. accessing the buffer's routines.  See wvLib for a detailed description
  17. of how the BUFFER_DESC is used.
  18. */
  19.  
  20. #ifndef __INCwvbufferph
  21. #define __INCwvbufferph
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. #include "private/semLibP.h"
  26. /* typedefs */
  27. #ifndef _ASMLANGUAGE
  28. typedef struct bufferDesc /* BUFFER_DESC */
  29.     {
  30.     OBJ_CORE    objCore;            /* buffer object core */
  31.     INT32       (*readReserveRtn)();/* request zero-copy read of buffer */
  32.     STATUS      (*readCommitRtn)(); /* commit after zero-copy read of buffer */
  33.     UINT8 *     (*writeRtn)();      /* write (with reserve) to buffer */
  34.     INT32 (*flushRtn)();     /* flush routine of buffer */
  35.     INT32 (*nBytesRtn)();     /* number readable bytes in buffer */
  36.     SEMAPHORE threshXSem;     /* sem given by buf when thresh crossed */
  37.     INT32 threshold;     /* arbitrary size in bytes set by buffer */
  38.     } BUFFER_DESC;
  39. typedef BUFFER_DESC *BUFFER_ID;
  40. #endif /* _ASMLANGUAGE */
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif /* __INCwvbufferph*/