On Fri, 2011-09-02 at 09:29 +0200, Sambasiva Rao Manchili wrote:
> Thank you Philippe for your time.
> Right now I did a workaround with a flag  after deleting a task and checking 
> this flag before doing any operation by task that was deleted. It works for 
> me.
> I could not believe  taskDelete did not work till yesterday.

A kernel change has not been propagated to the vxworks library years
ago. In the absence of user feedback and vxworks-specific testsuite in
Xenomai 2.x, we are blind.

> 
> I hope with next version of Xenomail release the tested patch for taskDelete 
> will be available and for now I live with my workaround.
> 
> Overall porting of VxWorks code, Integration and testing since three months. 
> I faced only two issues for which I got blocked.
> 1. semTake with specific timeout value failed in Xenomai.  As a workaround I 
> just removed this semTake and semGive , which is also OK to an extent in this 
> area of code.

Unlike the one with taskDelete(), this sema4 issue is surprising to me.
Can you elaborate?

> 2. taskDelete
> 
> Some of the vxworks functions that are not supported, I ported  to native 
> linux methods.
> 

At the moment, we only support the core O/S routines. This may change in
xenomai 3, as we won't have to deal with the legacy in-kernel
Xenomai/VxWorks API anymore.

> Thank you one and all for your support.
> Samba.
> 
> -----Original Message-----
> From: Philippe Gerum [mailto:r...@xenomai.org]
> Sent: Thursday, 01. September, 2011 22:28
> To: Sambasiva Rao Manchili
> Cc: Gilles Chanteperdrix; Xenomai-help@gna.org
> Subject: Re: [Xenomai-help] taskDelete(tid) on VxWorks Skin ?
> 
> On Thu, 2011-09-01 at 17:25 +0200, Sambasiva Rao Manchili wrote:
> > Hi,
> > It is reduced piece which explains the problem.
> > If it is much more then I will see what I can do.
> 
> User-space needs this, or something alike (not tested, not even compiled 
> actually):
> 
> diff --git a/src/skins/vxworks/taskLib.c b/src/skins/vxworks/taskLib.c index 
> f751788..70f33aa 100644
> --- a/src/skins/vxworks/taskLib.c
> +++ b/src/skins/vxworks/taskLib.c
> @@ -267,10 +267,34 @@ STATUS taskDeleteForce(TASK_ID task_id)
> 
>  STATUS taskDelete(TASK_ID task_id)
>  {
> +       TASK_DESC desc;
> +       pthread_t tid;
>         int err;
> 
> -       err =
> -           XENOMAI_SKINCALL1(__vxworks_muxid, __vxworks_task_delete, 
> task_id);
> +       err = XENOMAI_SKINCALL2(__vxworks_muxid,
> +                               __vxworks_taskinfo_get, task_id, &desc);
> +       if (err) {
> +               errno = abs(err);
> +               return ERROR;
> +       }
> +
> +       tid = (pthread_t)desc->td_opaque;
> +       if (tid == pthread_self()) {
> +               /* Silently migrate to avoid raising SIGXCPU. */
> +               XENOMAI_SYSCALL1(__xn_sys_migrate, XENOMAI_LINUX_DOMAIN);
> +               pthread_exit(NULL);
> +       }
> +
> +       if (tid) {
> +               err = pthread_cancel(tid);
> +               if (err)
> +                       return -err;
> +       }
> +
> +       err = XENOMAI_SKINCALL1(__vxworks_muxid, __vxworks_task_delete, 
> task_id);
> +       if (err == S_objLib_OBJ_ID_ERROR)
> +               return OK; /* Used to be valid, but has exited. */
> +
>         if (err) {
>                 errno = abs(err);
>                 return ERROR;
> 
> > Samba.
> >
> > -----Original Message-----
> > From: Gilles Chanteperdrix [mailto:gilles.chanteperd...@xenomai.org]
> > Sent: Thursday, 01. September, 2011 17:08
> > To: Sambasiva Rao Manchili
> > Cc: Xenomai-help@gna.org
> > Subject: Re: [Xenomai-help] taskDelete(tid) on VxWorks Skin ?
> >
> > On 09/01/2011 04:51 PM, Sambasiva Rao Manchili wrote:
> > >  Hi,
> > > The reason that I have not given this piece of code was because it is not 
> > > written by me oflate but  was code that exists since several years which 
> > > is running on VxWorks  on  different versions.
> > > I just ported this with very very minimal effort to Linux over Xenomai.
> > >
> >
> > I do not ask you to send your code, I ask you to send a reduced, 
> > self-contained test case, which demonstrates the issue you have, for 
> > reasons explained on the page I directed you to.
> >
> > --
> >                                             Gilles.
> >
> >
> > This email and any attachment may contain confidential information which is 
> > intended for use only by the addressee(s) named above. If you received this 
> > email by mistake, please notify the sender immediately, and delete the 
> > email from your system. You are prohibited from copying, disseminating or 
> > otherwise using the email or any attachment.
> >
> >
> > _______________________________________________
> > Xenomai-help mailing list
> > Xenomai-help@gna.org
> > https://mail.gna.org/listinfo/xenomai-help
> 
> --
> Philippe.
> 
> 
> 
> 
> 
> This email and any attachment may contain confidential information which is 
> intended for use only by the addressee(s) named above. If you received this 
> email by mistake, please notify the sender immediately, and delete the email 
> from your system. You are prohibited from copying, disseminating or otherwise 
> using the email or any attachment.
> 

-- 
Philippe.



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

Reply via email to