>>
>> This will set xnintr_t::name to "" if name is NULL - intentionally?
>
> xnintr_t::name becomes a reference to RT_INTR::name. The later one
> exists as long as the former anyway so there shoudn't be a broken
> reference.
Yes, this specifically addresses Mathias' concern about passed names
that are temporary variables.
It just leaves xnintr_t::name with an emptry string instead of "unknown"
in some cases. Either xnintr_init needs to take care of this, or we
should catch that case already here. I think empty strings in
/proc/xenomai/irq are bad in case of shared IRQ lists.
Yes, this is what I've mentioned as a possible exception in my previous mail.
This patch should address it (although, it makes a code flow a bit
obscure but not too much :)
Jan
--
Best regards,
Dmitry Adamushko
--- ./ksrc/skins/native/intr-new2.c 2007-01-10 14:46:08.319442000 +0100
+++ ./ksrc/skins/native/intr-new3.c 2007-01-10 15:51:22.933976000 +0100
@@ -242,7 +242,14 @@ int rt_intr_create(RT_INTR *intr,
if (xnpod_asynch_p())
return -EPERM;
- xnobject_copy_name(intr->name, name);
+ if (name)
+ xnobject_copy_name(intr->name, name);
+ else
+ /* Kernel-side "anonymous" objects (name == NULL) get unique names.
+ * Nevertheless, they will not be exported via the registry. */
+ xnobject_create_name(intr->name, sizeof(intr->name),
+ (void *)intr);
+
xnintr_init(&intr->intr_base, intr->name, irq, isr, iack, mode);
#if defined(__KERNEL__) && defined(CONFIG_XENO_OPT_PERVASIVE)
xnsynch_init(&intr->synch_base, XNSYNCH_PRIO);
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help