Subject:
|
Re: RCX Programming Questions and Sensor Ideas
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Tue, 10 Nov 1998 23:50:45 GMT
|
Viewed:
|
2808 times
|
| |
| |
>
> > An example. Say you want to prevent two tasks from fighting over motor
> > 1. Just insert an instruction in each task before operating the motor
> > to check that var 31 contains zero. If it does, set var 31 to 1 and
> > control the motor, then set var 31 to 0 again. If a task sees var 31 is
> > non-zero then you can program it to wait or abort as you wish.
Kekoa Proudfoot wrote:
> This assumes that the check and the set are, together, atomic. Does the
> SDK document describe what if/why this might be atomic? I haven't had a
> chance to read it in enough detail to find this answer for myself.
...and it would be my sincerest recommendation that you NOT read it,
Kekoa. It would be safer from the reverse-engineering standpoint that
you NOT use this SDK in any manner.
*I* can read it, though <g>, and I can find nothing that indicates a
"safe" way to implement semaphores.
Unfortunately, during my quick scan, I caught three typos/misusage
items (one we knew about before, where all the error codes use "TO_"
instead of "TOO_"), which detracts from the otherwise high quality of
LEGO products. :-(
-- joshua
|
|
Message has 2 Replies: | | Re: RCX Programming Questions and Sensor Ideas
|
| (...) Check and set do not have to be atomic, they have to be ordered. The sequence is: Check all flags, when clear, set our flag, check all flags again, if only ours is set, do stuff. 1. You can dedicate a task to managing semaphores. I described (...) (26 years ago, 11-Nov-98, to lugnet.robotics)
| | | Re: RCX Programming Questions and Sensor Ideas
|
| In message <3648D155.FF4306@alu...ucsc.edu>, Joshua Delahunty <lugnet.robotics@lugnet.com> writes (...) RECEIVED is spelt wrong in the Spirit.OCX software too. :-) I would like to add though that I was impressed with the high quality of the manual. (26 years ago, 11-Nov-98, to lugnet.robotics)
|
Message is in Reply To:
| | Re: RCX Programming Questions and Sensor Ideas
|
| (...) This assumes that the check and the set are, together, atomic. Does the SDK document describe what if/why this might be atomic? I haven't had a chance to read it in enough detail to find this answer for myself. -Kekoa (26 years ago, 10-Nov-98, to lugnet.robotics)
|
17 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|