Jan Kiszka wrote: > (...) > +#define DECLARE_BHEAP_CONTAINER(name, sz) \ > + struct { \ > + bheap_t bheap; \ > + bheaph_t elems[sz]; \ > + } name > +
Don't you mean bheaph_t *elems[sz] ? > (...) > +typedef struct { > + bheap_t bheap; > + bheaph_t __buffer[CONFIG_XENO_OPT_TIMER_HEAP_CAPACITY]; > +} xntimerq_t; Same remark. And why not using the macro here ? I would also prefer passing the bheaph_t** storage to bheap_init, and conserve bheap_destroy (with a callback called with the bheap_t** storage) in case the storage was dynamically allocated by the caller. -- Gilles Chanteperdrix. _______________________________________________ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core