diff --git a/m-mempool.h b/m-mempool.h index adb4ad71..1d600afc 100644 --- a/m-mempool.h +++ b/m-mempool.h @@ -27,6 +27,9 @@ #include "m-core.h" +// TODO: Full rework of the mempool module to provide a generic arena allocator +// instead using the new pool context pointer. + /* Fast, fixed size, thread unsafe allocator based on memory regions. No oplist is needed. USAGE: diff --git a/m-worker.h b/m-worker.h index 7022483e..dae7068e 100644 --- a/m-worker.h +++ b/m-worker.h @@ -269,7 +269,7 @@ typedef struct m_worker_sync_s { M_MEMORY_FULL(struct M_C3(m_worker_, name, _s), 1); \ } \ p->callback = callback; \ - M_MAP3(M_WORK3R_SPAWN_EXTEND_DEF_EMPLACE_FIELD_COPY, data, __VA_ARGS__) \ + M_MAP3(M_WORK3R_SPAWN_EXTEND_DEF_EMPLACE_FIELD_INIT_SET, data, __VA_ARGS__) \ const m_work3r_order_ct w = { block, p, M_C3(m_work3r_, name, _callback) M_WORK3R_EXTRA_ORDER }; \ if (m_work3r_queue_push (block->worker->queue_g, w) == true) { \ atomic_fetch_add (&block->num_spawn, 1); \ @@ -288,7 +288,7 @@ typedef struct m_worker_sync_s { #define M_WORK3R_SPAWN_EXTEND_DEF_EMPLACE_FIELD(data, num, oplist) \ M_GET_TYPE oplist M_C(param, num) -#define M_WORK3R_SPAWN_EXTEND_DEF_EMPLACE_FIELD_COPY(data, num, oplist) \ +#define M_WORK3R_SPAWN_EXTEND_DEF_EMPLACE_FIELD_INIT_SET(data, num, oplist) \ M_CALL_INIT_SET(oplist, p-> M_C(field, num), M_C(param, num) ); #define M_WORK3R_SPAWN_EXTEND_DEF_EMPLACE_FIELD_ALONE(data, num, oplist) \