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

VxWorks

开发平台:

C/C++

  1. /* dcacheCbio.h - disk cache manager header file */
  2. /* Copyright 1999-2002 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01g,04mar02,jkf  SPR#32277, adding dcacheDevEnable and Disable
  7. 01f,21sep01,jkf  SPR#69031, common code for both AE & 5.x.
  8. 01e,29feb00,jkf  T3 changes
  9. 01d,31jul99,jkf  T2 merge, tidiness & spelling.
  10. 01c,09sep98,lrn  added dcacheDevMemResize() prototype
  11. 01b,06sep98,lrn  changed dcacheDevCreate() prototype for CBIO subordinate
  12. 01a,15jun98,lrn  written.
  13. */
  14. #ifndef __INCdcacheCbioh
  15. #define __INCdcacheCbioh
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /* defines */
  20. #define DCACHE_MAX_DEVS     16 /* max # of cached devices */
  21. /* globals */
  22. IMPORT int dcacheUpdTaskId ; /* updater task id, one per system */
  23. IMPORT int dcacheUpdTaskPriority ; /* updater task priority - tunable */
  24. IMPORT int dcacheUpdTaskStack ; /* updater task stack size - tunable */
  25. /* prototypes */
  26. IMPORT CBIO_DEV_ID dcacheDevCreate (
  27.     CBIO_DEV_ID subDev,   /* lower level device handle */
  28.     char  *   pRamAddr,    /* where it is in memory (NULL = malloc)  */
  29.     int       memSize,   /* amount of memory to use                */
  30.     char *    pDesc /* device pDesc string */
  31.     ) ;
  32. IMPORT STATUS dcacheDevTune (
  33.     CBIO_DEV_ID dev, /* device handle */
  34.     int dirtyMax, /* max # of dirty cache blocks allowed */
  35.     int bypassCount, /* request size for bypassing cache */
  36.     int readAhead, /* how many blocks to read ahead */
  37.     int syncInterval /* how many seconds between disk updates */
  38.     ) ;
  39. IMPORT void dcacheShow (
  40.     CBIO_DEV_ID dev, /* device handle */
  41.     int verbose /* 1: display state of each cache block */
  42.     ) ;
  43. IMPORT STATUS dcacheDevMemResize
  44.     (
  45.     CBIO_DEV_ID dev, /* device handle */
  46.     size_t newSize /* new cache size in bytes */
  47.     ) ;
  48. IMPORT STATUS dcacheDevEnable
  49.     (
  50.     CBIO_DEV_ID dev  /* CBIO device handle */
  51.     );
  52. IMPORT STATUS dcacheDevDisable
  53.     (
  54.     CBIO_DEV_ID dev   /* CBIO device handle */
  55.     );
  56. #ifdef __cplusplus
  57. }
  58. #endif
  59. #endif /*__INCdcacheCbioh*/