Changed my mind, modified types.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10742 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
cc61794d1a
commit
23c7476ac4
|
@ -95,7 +95,7 @@ union heap_header {
|
|||
* @brief Structure describing a memory heap.
|
||||
*/
|
||||
struct memory_heap {
|
||||
memgetfunc_t provider; /**< @brief Memory blocks provider for
|
||||
memgetfunc2_t provider; /**< @brief Memory blocks provider for
|
||||
this heap. */
|
||||
heap_header_t header; /**< @brief Free blocks list header. */
|
||||
#if CH_CFG_USE_MUTEXES == TRUE
|
||||
|
|
|
@ -68,7 +68,12 @@
|
|||
/**
|
||||
* @brief Memory get function.
|
||||
*/
|
||||
typedef void *(*memgetfunc_t)(size_t size, unsigned align, size_t offset);
|
||||
typedef void *(*memgetfunc_t)(size_t size, unsigned align);
|
||||
|
||||
/**
|
||||
* @brief Enhanced memory get function.
|
||||
*/
|
||||
typedef void *(*memgetfunc2_t)(size_t size, unsigned align, size_t offset);
|
||||
|
||||
/**
|
||||
* @brief Type of memory core object.
|
||||
|
|
|
@ -235,7 +235,7 @@ void _factory_init(void) {
|
|||
dyn_list_init(&ch_factory.obj_list);
|
||||
chPoolObjectInit(&ch_factory.obj_pool,
|
||||
sizeof (registered_object_t),
|
||||
chCoreAllocAlignedWithOffsetI);
|
||||
chCoreAllocAlignedI);
|
||||
#endif
|
||||
#if CH_CFG_FACTORY_GENERIC_BUFFERS == TRUE
|
||||
dyn_list_init(&ch_factory.buf_list);
|
||||
|
@ -244,7 +244,7 @@ void _factory_init(void) {
|
|||
dyn_list_init(&ch_factory.sem_list);
|
||||
chPoolObjectInit(&ch_factory.sem_pool,
|
||||
sizeof (dyn_semaphore_t),
|
||||
chCoreAllocAlignedWithOffsetI);
|
||||
chCoreAllocAlignedI);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ void *chPoolAllocI(memory_pool_t *mp) {
|
|||
mp->next = mp->next->next;
|
||||
}
|
||||
else if (mp->provider != NULL) {
|
||||
objp = mp->provider(mp->object_size, PORT_NATURAL_ALIGN, 0U); /* TODO: Alignment is not properly handled */
|
||||
objp = mp->provider(mp->object_size, PORT_NATURAL_ALIGN); /* TODO: Alignment is not properly handled */
|
||||
}
|
||||
/*lint -restore*/
|
||||
|
||||
|
|
|
@ -1158,11 +1158,10 @@ static MEMORYPOOL_DECL(mp1, sizeof (uint32_t), NULL);
|
|||
static GUARDEDMEMORYPOOL_DECL(gmp1, sizeof (uint32_t));
|
||||
#endif
|
||||
|
||||
static void *null_provider(size_t size, unsigned align, size_t offset) {
|
||||
static void *null_provider(size_t size, unsigned align) {
|
||||
|
||||
(void)size;
|
||||
(void)align;
|
||||
(void)offset;
|
||||
|
||||
return NULL;
|
||||
}]]></value>
|
||||
|
|
|
@ -58,11 +58,10 @@ static MEMORYPOOL_DECL(mp1, sizeof (uint32_t), NULL);
|
|||
static GUARDEDMEMORYPOOL_DECL(gmp1, sizeof (uint32_t));
|
||||
#endif
|
||||
|
||||
static void *null_provider(size_t size, unsigned align, size_t offset) {
|
||||
static void *null_provider(size_t size, unsigned align) {
|
||||
|
||||
(void)size;
|
||||
(void)align;
|
||||
(void)offset;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -3547,11 +3547,10 @@ static MEMORYPOOL_DECL(mp1, sizeof (uint32_t), NULL);
|
|||
static GUARDEDMEMORYPOOL_DECL(gmp1, sizeof (uint32_t));
|
||||
#endif
|
||||
|
||||
static void *null_provider(size_t size, unsigned align, size_t offset) {
|
||||
static void *null_provider(size_t size, unsigned align) {
|
||||
|
||||
(void)size;
|
||||
(void)align;
|
||||
(void)offset;
|
||||
|
||||
return NULL;
|
||||
}]]></value>
|
||||
|
|
|
@ -58,11 +58,10 @@ static MEMORYPOOL_DECL(mp1, sizeof (uint32_t), NULL);
|
|||
static GUARDEDMEMORYPOOL_DECL(gmp1, sizeof (uint32_t));
|
||||
#endif
|
||||
|
||||
static void *null_provider(size_t size, unsigned align, size_t offset) {
|
||||
static void *null_provider(size_t size, unsigned align) {
|
||||
|
||||
(void)size;
|
||||
(void)align;
|
||||
(void)offset;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue