Hi at all,
I'am sure that the same code run fine with Xenomai-2.1.1, kernel
linux-2.6.15-ipipe-1.2-15.
Why there are problems now?
I want underline my purpose: my tasks should be exit in asyncronous way
executing costom exit routine.
How can I do this in Xenomai?
I've considered the use of rt_add_hook() but compiling the code the compiler
returns these errors:
warning: implicit declaration of function `rt_task_add_hook'
undefined reference to `rt_task_add_hook'
collect2: ld returned 1 exit status

Thanks for help!

Salvatore De Astis
>
>
>
> 2008/2/14, Gilles Chanteperdrix <[EMAIL PROTECTED]>:
> >
> > On Thu, Feb 14, 2008 at 10:53 AM, Peter Soetens <[EMAIL PROTECTED]>
> > wrote:
> > > On Thursday 14 February 2008 10:42:23 Gilles Chanteperdrix wrote:
> > >  > On Wed, Feb 13, 2008 at 5:29 PM, Salvatore De Astis <
> > [EMAIL PROTECTED]>
> > >  wrote:
> > >  > > Hi,
> > >  > > I need to implement a multitask application.
> > >  > > The most important point is to have a 'custom' exit procedure for
> > each
> > >  > > task. The calling of the exit procedure should happen in
> > asynchronous
> > >  > > mode. The exit procedure of each task, after the 'custom' code,
> > must call
> > >  > >  the rt_task_delete()   before leaving.
> > >  > >
> > >  > > The following code is a simple example:
> > >  > > There are two tasks, two semaphores and two other tasks (pending
> > on
> > >  > > semaphores) whose target is to execute the parent's exit
> > procedure.
> > >  > > In this case the exit procedure is the my_exit() routine for both
> > tasks,
> > >  > > but, of course, I'd like to have custom exit procedure for each
> > task.
> > >  > >  Please read the questions following the code section.
> > >  > >
> > >  > > Why the opaque2 is 0 in Pippo's rt_task_delete call? Dmesg shows
> > me
> > >  > > 3086322608 in __rt_task_create() of Pippo task.
> > >  > > What's wrong with my code?
> > >  > >  Does a better method exist to implemet  asyncronous
> > rt_task_delete in
> > >  > > Xenomai?
> > >  >
> > >  > The best way to do what you want to do is to call rt_task_delete
> > from
> > >  > the task to be deleted itself, because trying to delete a thread
> > from
> > >  > another thread entails problems which can only be solved by sending
> > a
> > >  > SIGKILL to the whole application.
> > >
> > >  or by using rt_task_join, naturally ! This requires that you create a
> > joinable
> > >  thread though, using T_JOINABLE in rt_task_spawn.
> >
> >
> > I am afraid this will not help. As far as I understand the code, the
> > SIGKILL signal is sent to the whole process if xnpod_delete_thread is
> > reached before the task answered the pthread_cancel request by
> > cleaning itself up properly.
> >
> > --
> >
> > Gilles Chanteperdrix
> >
> >
> > _______________________________________________
> > Xenomai-help mailing list
> > Xenomai-help@gna.org
> > https://mail.gna.org/listinfo/xenomai-help
> >
>
>
_______________________________________________
Xenomai-help mailing list
Xenomai-help@gna.org
https://mail.gna.org/listinfo/xenomai-help

Reply via email to