Subject:
|
Re: Semaphore(s) locked when task killed.
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Thu, 5 Sep 2002 14:39:24 GMT
|
Viewed:
|
2147 times
|
| |
| |
Last night I worked on a solution to this. So far it is coming along very
good.
My proposed solution is to write tasks so that they shutdown when signalled.
The user tasks should respond to the run/stop button by shutting down
gracefully. If a task fails to do so, or is unable to, then the kernel will
kill the task. Killing a task is risky business, since the task may be
allocating memory or using lnp.
I plan on posting my solution soon along with some documentation on writing
well behaved tasks (to work with the updated kernel).
Originally, I experienced this problem with a program that allocated and
deallocated memory often. Hitting run/stop caused a crash more often than
not (I got used to pulling the battery). I gave up on that project.
Status: The update is working; demo programs are working (well behaved and
not well behaved). I still need to work on alternate configurations... like
removing CONF_TM will result in compile errors currently.
// Joe
"Steve Hassenplug" <hassenplug@mail.com> wrote in message
news:H1x74L.Hrs@lugnet.com...
> In lugnet.robotics.rcx.legos, Joseph Woolley writes:
> > I have found that killing a task which is sending data via lnp will cause
> > lnp to stop functioning. Turning the brick off then on again will get lnp
> > working again. The issue is with the semaphore(s) used in the kernel tasks.
>
> This explains a problem I've been having. I've noticed this exact issue,
> but I wasn't sure if I was doing something wrong, or exactly what the
> problem was.
>
> I have a program that sends IR messages (for proximity) and after the
> program is stopped, it won't send messages, again.
>
> I'm not stopping the tasks. They are stopped by the run button, and
> everything works fine after the power is cycled.
>
> Thanks for bringing this to light.
>
> Steve
|
|
Message is in Reply To:
| | Re: Semaphore(s) locked when task killed.
|
| (...) This explains a problem I've been having. I've noticed this exact issue, but I wasn't sure if I was doing something wrong, or exactly what the problem was. I have a program that sends IR messages (for proximity) and after the program is (...) (22 years ago, 4-Sep-02, to lugnet.robotics.rcx.legos)
|
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|