Problem when suspending a task.
Nick Thomas
nick.thomas at pixsan.com
Wed Jan 6 15:32:06 UTC 2010
OK, I understand that, and I appreciate the responses so far.
But, the documentation clearly states that rtems_task_suspend(rtems_id id);
can suspend the caller or another task!
But, the internals of my BSP might not be very forgiving for such a thing.
I will try to re-design so as to avoid suspending a task from another task,
and see how that goes.
Many thanks.
Nick
> -----Original Message-----
> From: Eric Norum [mailto:wenorum at lbl.gov]
> Sent: 06 January 2010 14:51
> To: Nick Thomas
> Cc: rtems-users at rtems.com
> Subject: Re: Problem when suspending a task.
>
> There are lots of places in the I/O code where a mutex is held.
> Suspending or destroying another task while it's holding a mutex is a
> sure way to lock up the system. You should rethink your design and
> determine some way to avoid such operations except from within the task
> itself.
> --
> Eric Norum
> wenorum at lbl.gov
> On Jan 6, 2010, at 5:55 AM, Nick Thomas wrote:
>
> > Hi,
> >
> > Not much to go on with this, but I am suffering from a weird problem
> > shortly after a task is suspended using rtems_task_suspend.
> >
> > The problem is that lots of other tasks appear hung too, not just the
> > one I wanted to suspend.
> > This includes the rtems monitor task, so getting info out of the unit
> > is very difficult.
> >
> > I don't really know where to start looking for the cause of this
> issue.
> >
> > Bizarrely, the task which is being suspended has a lot of printf
> statements.
> > If I remove these printf statements then the problem doesn't happen
> > and the unit continues to function normally.
> >
> > Is there a problem when suspending a task when it is in the middle of
> > a printf statement?
> >
> >
> > Regards
> >
> > Nick
> >
> > -----------------------------
> > Nick Thomas
> > Email: nick.thomas at pixsan.com
> >
> > _______________________________________________
> > rtems-users mailing list
> > rtems-users at rtems.org
> > http://www.rtems.org/mailman/listinfo/rtems-users
>
> --
> Eric Norum
> wenorum at lbl.gov
>
More information about the users
mailing list