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

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to