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

VxWorks

开发平台:

C/C++

  1. /* m82xxDpramLib.h - 82xx DPRAM memory allocation driver */
  2. /* Copyright 1984-2001 Wind River Systems, Inc. */
  3. #include "copyright_wrs.h"
  4. /*
  5. modification history
  6. --------------------
  7. 01c,26nov01,rcs   renamed m82xxDpramLib.h and moved to target/h/drv/mem
  8. 01b,17jul01,g_h   cleaning and renaming to sys82xxDpramLib.h
  9. 01a,16jul01,p_h   created
  10. */
  11. /*
  12. DESCRIPTION
  13. This module contains m82xx DPRAM memory allocation driver.
  14. */
  15. #ifndef __INCm82xxDpramh
  16. #define __INCm82xxDpramh
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. #include "vxWorks.h"
  21. /* Define part */
  22. #define ALLOCTABLESIZE 64
  23. typedef struct ADDR_RESOURCE
  24.     {
  25.     UINT32                 start;
  26.     UINT32                 size;
  27.     struct ADDR_RESOURCE * pNext;
  28.     } ADDR_RESOURCE;
  29. typedef struct
  30.     {
  31.     UINT32          start;
  32.     UINT32          limit;
  33.     ADDR_RESOURCE * pHead;
  34.     } POOL;
  35. /* Prototypes */
  36. void  m82xxDpramLibInit (void);
  37. void* m82xxDpramMalloc (size_t Length);
  38. void* m82xxDpramAlignedMalloc (size_t Length, size_t Alignment);
  39. void  m82xxDpramFree (void* Addr);
  40. void* m82xxDpramFccMalloc (size_t Length, size_t Alignment);
  41. void  m82xxDpramFccFree (void* Addr);
  42. #ifdef __cplusplus
  43. }
  44. #endif
  45.   
  46. #endif /* __INCm82xxDpramh */