To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 1841
1840  |  1842
Subject: 
Re: code
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 19 Apr 2001 23:24:47 GMT
Viewed: 
1485 times
  
In lugnet.robotics.rcx.legos, Chris Daniel writes:
Hi,I'm trying to run 2 infinate loops at the same time. Is this possible?
this is an example of what I'm trying to do. thanks

[snip]

   fun_a = execi(&pivot,0,0,9,
                    DEFAULT_STACK_SIZE);

   fun_c = execi(&rail,0,0,10,
                    DEFAULT_STACK_SIZE);

Can't see anything glaringly obvious, except you've used different priorities
for your tasks. As they're infinite loops with no waiting, it's probably better
to make their priorities equal.

But the best way is probably to do all this in a couple of wait_event
functions, called from separate tasks. I find this works better than infinite
loops, though I'm not sure why!!

HTH

ROSCO



Message is in Reply To:
  code
 
Hi,I'm trying to run 2 infinate loops at the same time. Is this possible? this is an example of what I'm trying to do. thanks #include <unistd.h> #include <dmotor.h> #include <dsensor.h> #include <conio.h> #include <time.h> pid_t fun_a; pid_t fun_c; (...) (23 years ago, 19-Apr-01, to lugnet.robotics.rcx.legos)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR