Problem when suspending a task.

Nick Thomas nick.thomas at pixsan.com
Thu Jan 7 10:00:45 UTC 2010



> -----Original Message-----
> From: Eric Norum [mailto:wenorum at lbl.gov]
> Sent: 06 January 2010 19:53
> To: Nick Thomas
> Cc: rtems-users at rtems.com
> Subject: Re: Problem when suspending a task.
> 
> Yep, RTEMS provides lots of options.
> This happens to be one that fits in the category of, "just because you
> *can* do something it doesn't mean that you "*should*" do something"..
> ;-)
> 
> There may be times when it's appropriate to suspend/destroy another
> task, but you have to take into consideration all the possible side
> effects of doing so.
> 
> 
> I hope that this doesn't overly complicate your application.


I presume that it is safe for task 'X' to suspend task 'Y' when 'Y' is
asleep, or waiting on a message Q.
And possibly when waiting on a semaphore.
So, is it possible to obtain the state of the task to be suspended, and if
it's in one of those states then I can suspend it.
I see that the task state is listed in the monitor 'task' command, but this
code is in RTEMS, and I can't see an obvious rtems_task_xxx API call to
obtain this info. Is there one?


Regards

Nick


> --
> Eric Norum
> wenorum at lbl.gov
> 





More information about the users mailing list