Subject:
|
Re: Semaphore(s) locked when task killed.
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Wed, 4 Sep 2002 02:47:58 GMT
|
Viewed:
|
2303 times
|
| |
| |
> So, the question is, what is a good solution to this problem?
hmmm I wonder what other unix like OSs do in this situation? automatically
unlocking doesn't seem particuarlly clean, what is to say that it is safe to
unlock the mutexes just because the locking thread has been killed?
Perhaps we can implement other thread cleanup mechanisms. I'm fond of thread
cancelation, where the thread will only exit when it's at a testCancel() call.
Also you can have a stack of cleanup functions which get called, this can be
used with or without cancelation code. Using either of these would allow us to
handle cleanup based on the layer of code we are in. They are both fairly easy
to implement as well and could be useful in the user programs as well.
mark
|
|
Message is in Reply To:
| | Semaphore(s) locked when task killed.
|
| 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. Currently there is no (...) (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
|
|
|
|