Module: xenomai-3 Branch: next Commit: 5c48d328880b13e8ad3c59f71f97a53eccd398f4 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=5c48d328880b13e8ad3c59f71f97a53eccd398f4
Author: Philippe Gerum <r...@xenomai.org> Date: Wed Jun 13 08:50:54 2018 +0200 include/copperplate: heapobj: make heapmem section C++-friendly --- include/copperplate/heapobj.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/include/copperplate/heapobj.h b/include/copperplate/heapobj.h index c8a7773..ade7e75 100644 --- a/include/copperplate/heapobj.h +++ b/include/copperplate/heapobj.h @@ -148,38 +148,39 @@ extern struct heap_memory heapmem_main; static inline void pvheapobj_destroy(struct heapobj *hobj) { - heapmem_destroy(hobj->pool); + heapmem_destroy((struct heap_memory *)hobj->pool); } static inline int pvheapobj_extend(struct heapobj *hobj, size_t size, void *mem) { - return heapmem_extend(hobj->pool, mem, size); + return heapmem_extend((struct heap_memory *)hobj->pool, + mem, size); } static inline void *pvheapobj_alloc(struct heapobj *hobj, size_t size) { - return heapmem_alloc(hobj->pool, size); + return heapmem_alloc((struct heap_memory *)hobj->pool, size); } static inline void pvheapobj_free(struct heapobj *hobj, void *ptr) { - heapmem_free(hobj->pool, ptr); + heapmem_free((struct heap_memory *)hobj->pool, ptr); } static inline size_t pvheapobj_validate(struct heapobj *hobj, void *ptr) { - ssize_t size = heapmem_check(hobj->pool, ptr); + ssize_t size = heapmem_check((struct heap_memory *)hobj->pool, ptr); return size < 0 ? 0 : size; } static inline size_t pvheapobj_inquire(struct heapobj *hobj) { - return heapmem_used_size(hobj->pool); + return heapmem_used_size((struct heap_memory *)hobj->pool); } static inline void *pvmalloc(size_t size) _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git