10 #ifndef __ewf_allocator_threadx__h__included__
11 #define __ewf_allocator_threadx__h__included__
34 VOID * block_pool_buffer_ptr;
47 #ifdef EWF_PARAMETER_CHECKING
48 #define EWF_ALLOCATOR_THREADX_INITIALIZE_HEADER(allocator_ptr) \
50 (allocator_ptr)->struct_magic = EWF_ALLOCATOR_STRUCT_MAGIC; \
51 (allocator_ptr)->struct_size = EWF_ALLOCATOR_STRUCT_SIZE; \
52 (allocator_ptr)->struct_version = EWF_ALLOCATOR_VERSION; \
53 (allocator_ptr)->struct_type = EWF_ALLOCATOR_TYPE_THREADX; \
56 #define EWF_ALLOCATOR_THREADX_INITIALIZE_HEADER(allocator_ptr)
66 #define EWF_ALLOCATOR_THREADX_STATIC_DECLARE(allocator_ptr, allocator_name_symb, block_count_param, block_size_param) \
68 static ULONG block_pool_buffer__##allocator_name_symb[(block_count_param * (block_size_param + sizeof(void*))) / sizeof(ULONG)]; \
69 static ewf_allocator_threadx ewf_allocator_threadx__##allocator_name_symb = {0}; \
70 static ewf_allocator ewf_allocator__##allocator_name_symb = {0}; \
71 ewf_allocator_threadx__##allocator_name_symb.block_pool_buffer_ptr = block_pool_buffer__##allocator_name_symb; \
72 ewf_allocator_threadx__##allocator_name_symb.pool_size = sizeof(block_pool_buffer__##allocator_name_symb); \
73 ewf_allocator__##allocator_name_symb.block_count = (ULONG) block_count_param; \
74 ewf_allocator__##allocator_name_symb.block_size = (ULONG) block_size_param; \
75 ewf_allocator__##allocator_name_symb.start = ewf_allocator_threadx_start; \
76 ewf_allocator__##allocator_name_symb.stop = ewf_allocator_threadx_stop; \
77 ewf_allocator__##allocator_name_symb.allocate = ewf_allocator_threadx_allocate; \
78 ewf_allocator__##allocator_name_symb.release = ewf_allocator_threadx_release; \
79 ewf_allocator__##allocator_name_symb.implementation_ptr = &(ewf_allocator_threadx__##allocator_name_symb); \
80 allocator_ptr = &(ewf_allocator__##allocator_name_symb); \
81 EWF_ALLOCATOR_THREADX_INITIALIZE_HEADER(allocator_ptr); \
struct _ewf_allocator_threadx ewf_allocator_threadx
ThreadX allocator implementation type.
enum _ewf_result ewf_result
Success and error result codes specific to the EWF API.
ThreadX allocator implementation type.
Definition: ewf_allocator_threadx.h:32
TX_BLOCK_POOL block_pool
Definition: ewf_allocator_threadx.h:33
ULONG pool_size
Definition: ewf_allocator_threadx.h:35
The allocator structure definition.
Definition: ewf_allocator.h:27