All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] [PATCH v2 2/3] nucleus: Include all heaps in	statistics
Date: Mon, 19 Oct 2009 20:17:48 +0200	[thread overview]
Message-ID: <4ADCAD4C.2000504@domain.hid> (raw)
In-Reply-To: <20091019171612.3332.48569.stgit@domain.hid>

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 use a Linux spinlock in xnheap_init and xnheap_destroy:
- this breaks the build for the simulator;
- callers of xnheap_init and xnheap_destroy are not guaranteed to run on
the root domain.

-- 
					    Gilles.


  reply	other threads:[~2009-10-19 18:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-19 17:16 [Xenomai-core] [PATCH v2 0/3] Sem heap statistics & mutex auto-cleanup fixes Jan Kiszka
2009-10-19 17:16 ` [Xenomai-core] [PATCH v2 3/3] native: Release fastlock to the proper heap Jan Kiszka
2009-10-19 17:16 ` [Xenomai-core] [PATCH v2 2/3] nucleus: Include all heaps in statistics Jan Kiszka
2009-10-19 18:17   ` Gilles Chanteperdrix [this message]
2009-10-19 19:09     ` Jan Kiszka
2009-10-20 10:32       ` Philippe Gerum
2009-10-20 11:44         ` Jan Kiszka
2009-10-20 12:48           ` Philippe Gerum
2009-10-19 17:16 ` [Xenomai-core] [PATCH v2 1/3] nucleus: Use Linux spin lock for heap list management Jan Kiszka
2009-10-19 18:08   ` Gilles Chanteperdrix
2009-10-19 19:10     ` Jan Kiszka
2009-10-19 19:17       ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ADCAD4C.2000504@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=jan.kiszka@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.