All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Sambasiva Rao Manchili <sambasiva.manchili@domain.hid>
Cc: "Xenomai-help@domain.hid" <Xenomai-help@domain.hid>
Subject: Re: [Xenomai-help] taskDelete(tid) on VxWorks Skin ?
Date: Fri, 02 Sep 2011 10:00:50 +0200	[thread overview]
Message-ID: <1314950450.22237.14.camel@domain.hid> (raw)
In-Reply-To: <509DA52866E38F47878413CF102D751FED236D784C@poseidon.nexus-ag.com>

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:rpm@xenomai.org]
> Sent: Thursday, 01. September, 2011 22:28
> To: Sambasiva Rao Manchili
> Cc: Gilles Chanteperdrix; Xenomai-help@domain.hid
> 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.chanteperdrix@xenomai.org]
> > Sent: Thursday, 01. September, 2011 17:08
> > To: Sambasiva Rao Manchili
> > Cc: Xenomai-help@domain.hid
> > 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@domain.hid
> > 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.




  reply	other threads:[~2011-09-02  8:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-01 10:32 [Xenomai-help] taskDelete(tid) on VxWorks Skin ? Sambasiva Rao Manchili
2011-09-01 11:36 ` Gilles Chanteperdrix
2011-09-01 12:01   ` Sambasiva Rao Manchili
2011-09-01 12:06     ` Gilles Chanteperdrix
2011-09-01 14:51       ` Sambasiva Rao Manchili
2011-09-01 15:08         ` Gilles Chanteperdrix
2011-09-01 15:25           ` Sambasiva Rao Manchili
2011-09-01 20:27             ` Philippe Gerum
2011-09-01 20:35               ` Philippe Gerum
2011-09-06 11:13                 ` Sambasiva Rao Manchili
2011-09-02  7:29               ` Sambasiva Rao Manchili
2011-09-02  8:00                 ` Philippe Gerum [this message]
2011-09-02  9:22                   ` Gilles Chanteperdrix
2011-09-02 15:32                     ` Philippe Gerum
  -- strict thread matches above, loose matches on Subject: below --
2011-09-01 10:23 Sambasiva Rao Manchili
2011-09-01 20:29 ` Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1314950450.22237.14.camel@domain.hid \
    --to=rpm@xenomai.org \
    --cc=Xenomai-help@domain.hid \
    --cc=sambasiva.manchili@domain.hid \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.