Subject:
|
Re: Errors compiling threads
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Thu, 4 Aug 2005 23:19:16 GMT
|
Viewed:
|
7384 times
|
| |
| |
In lugnet.robotics.rcx.legos, Steve Hassenplug wrote:
> On Wed, August 3, 2005 9:01 pm, Marcelo Molinari wrote:
> > seeker.c:18: parse error before `driving_thread'
> > seeker.c:19: parse error before `bumper_thread'
> > seeker.c:20: parse error before `light_thread'
> > seeker.c: In function `basic_driver':
> > seeker.c:274: `sys_time' undeclared (first use in this function)
> > make: *** [seeker.o] Error 1
> >
> >
> > I assume I have a problem with my compiler, but I can't figure out what it is. Any help will be very welcomed!
>
> I don't think it's a problem with the compiler. There have been changes to the BrickOS code over the years. I know the value sys_time has been replaced with the function Get_sys_up_time(). You should be able to add this line at the beginning of the code:
>
> #define sys_time Get_sys_up_time() // v10 does not have sys_time
>
> Or, maybe that would do other bad things. You could just replace sys_time with Get_sys_up_time() everywhere in the code. And, I just went looking through the new code. I think 'pid_t' was replaced with 'tid_t'. Make those changes in your program (seeker), and you should be good to go.
>
> Steve
Hi Steve,
Thanks, you were right about the compiler being ok. I changed "pid_t" to "tid_t"
and got the thread statements working correctly. Finally, by consulting BrickOS
documentation I found out the new syntax for the old "sys_time" command is
"get_system_up_time()". I added the line
#define sys_time get_system_up_time() to Seeker.c and then it compiled ok.
Thanks a lot,
Marcelo
|
|
Message is in Reply To:
| | Re: Errors compiling threads
|
| (...) I don't think it's a problem with the compiler. There have been changes to the BrickOS code over the years. I know the value sys_time has been replaced with the function Get_sys_up_time(). You should be able to add this line at the beginning (...) (19 years ago, 4-Aug-05, to lugnet.robotics.rcx.legos)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|