Module: xenomai-3 Branch: next Commit: 44915d39ed46190570038457edaa7f4fa043872d URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=44915d39ed46190570038457edaa7f4fa043872d
Author: Philippe Gerum <r...@xenomai.org> Date: Sat May 19 15:04:06 2018 +0200 cobalt/heap: add accessor to usage counter --- include/cobalt/kernel/heap.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/cobalt/kernel/heap.h b/include/cobalt/kernel/heap.h index 8a1c6f6..09c982f 100644 --- a/include/cobalt/kernel/heap.h +++ b/include/cobalt/kernel/heap.h @@ -108,6 +108,12 @@ size_t xnheap_get_size(const struct xnheap *heap) } static inline +size_t xnheap_get_used(const struct xnheap *heap) +{ + return heap->used_size; +} + +static inline size_t xnheap_get_free(const struct xnheap *heap) { return heap->usable_size - heap->used_size; _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git