Dmitry Adamushko wrote:
> Hi,
>
> I suppose, one more thing was missed. intr_reg.patch is to address it.
>
> intr_swap.patch - to be safe with xnintr_t::name in all cases. In
> particular, the reported crash should disappear without other
> additional patches.
>
>
>
> ------------------------------------------------------------------------
>
> --- ./ksrc/skins/native/intr.c 2006-06-15 14:15:44.000000000 +0200
> +++ ./ksrc/skins/native/intr-new.c 2007-01-10 14:45:26.320565000 +0100
> @@ -223,6 +223,7 @@ static xnpnode_t __intr_pnode = {
> *
> * - Kernel module initialization/cleanup code
> * - Kernel-based task
> + * - User-space task
> *
> * Rescheduling: possible.
> *
> @@ -262,11 +263,21 @@ int rt_intr_create(RT_INTR *intr,
> /* <!> Since xnregister_enter() may reschedule, only register
> complete objects, so that the registry cannot return handles to
> half-baked objects... */
> + if (!err && name) {
> + xnpnode_t *pnode = &__intr_pnode;
>
> - if (!err)
> - err =
> - xnregistry_enter(intr->name, intr, &intr->handle,
> - &__intr_pnode);
> + if (!*name) {
> + /* Since this is an anonymous object (empty name on
> entry)Isn't a NULL name representing an anonymous object as well? > + * from user-space, it gets registered under an unique > + * internal name but is not exported through /proc. */ > + xnobject_create_name(intr->name, sizeof(intr->name), > + (void *)intr); > + pnode = NULL; > + } > + > + err = xnregistry_enter(intr->name, intr, &intr->handle, pnode); > + } > + > #endif /* CONFIG_XENO_OPT_REGISTRY */ > > if (err) > > > ------------------------------------------------------------------------ > > --- ./ksrc/skins/native/intr-new.c 2007-01-10 14:45:26.320565000 +0100 > +++ ./ksrc/skins/native/intr-new2.c 2007-01-10 14:46:08.319442000 +0100 > @@ -242,8 +242,8 @@ int rt_intr_create(RT_INTR *intr, > if (xnpod_asynch_p()) > return -EPERM; > > - xnintr_init(&intr->intr_base, name, irq, isr, iack, mode); > xnobject_copy_name(intr->name, name); > + xnintr_init(&intr->intr_base, intr->name, irq, isr, iack, mode); This will set xnintr_t::name to "" if name is NULL - intentionally? Jan
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
