Re: [Xenomai-core] [PATCH v2 2/3] nucleus: Include all heaps in statistics

2009-10-20 Thread Philippe Gerum
On Mon, 2009-10-19 at 21:09 +0200, Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: @@ -234,12 +239,65 @@ int xnheap_init(xnheap_t *heap, appendq(heap-extents, extent-link); + vsnprintf(heap-name, sizeof(heap-name), name, args); + + spin_lock(heapq_lock);

Re: [Xenomai-core] [PATCH v2 2/3] nucleus: Include all heaps in statistics

2009-10-20 Thread Jan Kiszka
Philippe Gerum wrote: On Mon, 2009-10-19 at 21:09 +0200, Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: @@ -234,12 +239,65 @@ int xnheap_init(xnheap_t *heap, appendq(heap-extents, extent-link); + vsnprintf(heap-name, sizeof(heap-name), name, args); + +

Re: [Xenomai-core] [PATCH v2 2/3] nucleus: Include all heaps in statistics

2009-10-19 Thread Gilles Chanteperdrix
Jan Kiszka wrote: @@ -234,12 +239,65 @@ int xnheap_init(xnheap_t *heap, appendq(heap-extents, extent-link); + vsnprintf(heap-name, sizeof(heap-name), name, args); + + spin_lock(heapq_lock); + appendq(heapq, heap-stat_link); + spin_unlock(heapq_lock); You can not

Re: [Xenomai-core] [PATCH v2 2/3] nucleus: Include all heaps in statistics

2009-10-19 Thread Jan Kiszka
Gilles Chanteperdrix wrote: Jan Kiszka wrote: @@ -234,12 +239,65 @@ int xnheap_init(xnheap_t *heap, appendq(heap-extents, extent-link); +vsnprintf(heap-name, sizeof(heap-name), name, args); + +spin_lock(heapq_lock); +appendq(heapq, heap-stat_link); +