Changeset 380 for branches/1.2/mem.h
- Timestamp:
- 05/10/2007 01:20:46 AM (19 months ago)
- Files:
-
- 1 modified
-
branches/1.2/mem.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/mem.h
r148 r380 1 typedef struct _xc_mem_t xc_mem_t; 2 typedef struct _xc_block_t xc_block_t; 1 typedef struct _xc_mem_handlers_t xc_mem_handlers_t; 2 3 #ifndef XC_MEM_IMPL 4 struct _xc_mem_t { 5 const xc_mem_handlers_t *handlers; 6 xc_shm_t *shm; 7 }; 8 # define XC_MEM_IMPL _xc_mem_t 9 #endif 10 11 #ifndef XC_MEMBLOCK_IMPL 12 # define XC_MEMBLOCK_IMPL _xc_block_t 13 #endif 14 typedef struct XC_MEM_IMPL xc_mem_t; 15 typedef struct XC_MEMBLOCK_IMPL xc_block_t; 3 16 typedef unsigned int xc_memsize_t; 4 17 … … 38 51 } 39 52 40 typedef struct {53 struct _xc_mem_handlers_t { 41 54 XC_MEM_MALLOC((*malloc)); 42 55 XC_MEM_FREE((*free)); … … 54 67 XC_MEM_INIT((*init)); 55 68 XC_MEM_DESTROY((*destroy)); 56 } xc_mem_handlers_t;57 58 #ifndef XC_MEM_IMPL59 struct _xc_mem_t {60 const xc_mem_handlers_t *handlers;61 xc_shm_t *shm;62 69 }; 63 #endif64 70 65 71 int xc_mem_scheme_register(const char *name, const xc_mem_handlers_t *handlers);

