From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4B017F7A.4090409@domain.hid> Date: Mon, 16 Nov 2009 17:36:10 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <4B01792A.4090206@domain.hid> In-Reply-To: <4B01792A.4090206@domain.hid> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai-core] [Xenomai-git] Jan Kiszka : nucleus: Include all heaps in statistics List-Id: Xenomai life and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: xenomai-core Gilles Chanteperdrix wrote: > GIT version control wrote: >> +void xnheap_set_label(xnheap_t *heap, const char *label, ...) >> +{ >> + va_list args; >> + spl_t s; >> + >> + va_start(args, label); >> + >> + xnlock_get_irqsave(&nklock, s); >> + vsnprintf(heap->label, sizeof(heap->label), label, args); >> + xnlock_put_irqrestore(&nklock, s); > > Why do we need locking here ? > We already registered the heap, so I want to avoid that someone dumping /proc sees an inconsistent string - or even an unterminated one. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux