Subject:
|
Re: thread class for legOS
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Fri, 18 Jan 2002 13:11:39 GMT
|
Viewed:
|
1584 times
|
| |
![Post a public reply to this message](/news/icon-reply.gif) | |
> !! m_Pid = execi(&Thread::runWrapper, 0, (char**)NULL,
> m_Prio, m_Stack);
IRC, every method in C++ has an implicit parameter wich is the object itself;
that's why you can't cast it. Try the following (does someone have a nicer
solution?):
Put runWrapper() outside the class:
int runWrapper(int, char **th) {
((Thread*)th)->Run();
return 0;
}
in Start():
m_Pid = execi(runWrapper, 0, (char**)this, m_Prio, m_Stack);
Eric
--
email: eric.swalens@easynet.be
web: http://student.ulb.ac.be/~eswalens
|
|
Message has 1 Reply:
Message is in Reply To:
![](/news/x.gif) | | thread class for legOS
|
| I write a Thread class for LegOs with a simple interface like in Java or CommonC++. I'm using LegOs 0.2.4. Below are my work till yet. The problem is in the Method Start(). The line is marked with !!. The error message is at the end of the file. I (...) (22 years ago, 18-Jan-02, to lugnet.robotics.rcx.legos)
|
8 Messages in This Thread: ![thread class for legOS -Michael Wisse (18-Jan-02 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/46.gif) ![You are here](/news/here.gif) ![](/news/46.gif) ![Re: thread class for legOS -Ross Crawford (21-Jan-02 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/246.gif) ![Re: thread class for legOS -John A. Tamplin (21-Jan-02 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/46.gif) ![Re: thread class for legOS -Michael Ash (21-Jan-02 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/46.gif) ![Re: thread class for legOS -John A. Tamplin (21-Jan-02 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/46.gif) ![Re: thread class for legOS -Michael Ash (22-Jan-02 to lugnet.robotics.rcx.legos)](/news/x.gif)
![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: thread class for legOS -Ross Crawford (21-Jan-02 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
|
|
|
|