Subject:
|
Re: The BrickOS Task Manager
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Sat, 10 Jan 2004 14:54:43 GMT
|
Viewed:
|
3496 times
|
| |
![Post a public reply to this message](/news/icon-reply.gif) | |
In lugnet.robotics.rcx.legos, Michael Purvis wrote:
> In lugnet.robotics.rcx.legos, Joseph Woolley wrote:
> > IIRC the issue was that Task, Process and Thread were all used to
> > represent the same item/concept in the Kernel code.
> >
> > After some discussion, it was decided that the word Task would be used
> > in all cases. This improves readability, etc... (ie. Task Manager)
>
> Sorry, I'm still just not getting it at all. I have type errors all over the
> place trying to pass arguments to my task. Could someone please simply email me
> or post an example of a program that starts, runs two or more threads, and will
> actually compile?
This works.
Steve
----
#include <unistd.h>
#include <dbutton.h>
#include <dmotor.h>
int MotorSpeed = 0;
int RunMotor()
{
while (!shutdown_requested())
{
motor_a_dir(MotorSpeed);
}
return 0;
}
int CheckButton()
{
while (!shutdown_requested())
{
if (PRESSED(dbutton(),BUTTON_PROGRAM)) MotorSpeed = 1;
else MotorSpeed = 0;
}
return 0;
}
int main()
{
execi(&CheckButton, 0, NULL, 1, DEFAULT_STACK_SIZE);
execi(&RunMotor, 0, NULL, 1, DEFAULT_STACK_SIZE);
while(!shutdown_requested())
msleep(1000);
return 0;
}
------
|
|
Message has 2 Replies: ![](/news/x.gif) | | Re: The BrickOS Task Manager
|
| (...) Thank you again for the help, but unfortunately it only compiles when saved as a '.c' file. Some of my code depends pretty heavily on classes... is there any easy change to make this work as object oriented code? *just spent two hours trying (...) (20 years ago, 12-Jan-04, to lugnet.robotics.rcx.legos)
|
Message is in Reply To:
![](/news/x.gif) | | Re: The BrickOS Task Manager
|
| (...) Sorry, I'm still just not getting it at all. I have type errors all over the place trying to pass arguments to my task. Could someone please simply email me or post an example of a program that starts, runs two or more threads, and will (...) (20 years ago, 10-Jan-04, to lugnet.robotics.rcx.legos)
|
15 Messages in This Thread: ![The BrickOS Task Manager -Michael Purvis (4-Jan-04 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/46.gif) ![Re: The BrickOS Task Manager -Bapt Denaeyer (4-Jan-04 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/46.gif) ![Re: The BrickOS Task Manager -Michael Purvis (5-Jan-04 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/246.gif) ![Re: The BrickOS Task Manager -Ross Crawford (5-Jan-04 to lugnet.robotics.rcx.legos)](/news/x.gif)
![](/news/x.gif) ![](/news/x.gif) ![](/news/268.gif) ![Re: The BrickOS Task Manager -Bapt Denaeyer (5-Jan-04 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/46.gif) ![Re: The BrickOS Task Manager -Ralph Clark (5-Jan-04 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/46.gif) ![Re: The BrickOS Task Manager -Joseph Woolley (6-Jan-04 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/46.gif) ![Re: The BrickOS Task Manager -Michael Purvis (10-Jan-04 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/46.gif) ![You are here](/news/here.gif) ![](/news/246.gif) ![Re: The BrickOS Task Manager -Michael Purvis (10-Jan-04 to lugnet.robotics.rcx.legos)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: The BrickOS Task Manager -Michael Purvis (12-Jan-04 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/46.gif) ![Re: The BrickOS Task Manager -Steve Hassenplug (13-Jan-04 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/46.gif) ![Re: The BrickOS Task Manager -Michael Purvis (13-Jan-04 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/46.gif) ![Re: The BrickOS Task Manager -Mark Riley (13-Jan-04 to lugnet.robotics.rcx.legos)](/news/x.gif)
![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: The BrickOS Task Manager -Florian Schmidt (5-Jan-04 to lugnet.robotics.rcx.legos)](/news/x.gif)
- 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
|
|
|
|