Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/15/03 08:55
Read: times


 
#52641 - RE: Can I solve this?
Responding to: ???'s previous message
I can imagine how it may be done in ASM language; it seems you try to build sheduler for time-quanta based tasks...
Well, in C-language it is not so clean. Anyway, maybe:
1) Just call routine 2 inside timer ISR? someting like:
void timer_isr(void) interrupt 1 using 1 
{ 
routine2();
}


2) Set a signal for routine 1 that it should be holded, like:
void timer_isr(void) interrupt 1 using 1 
{ 
task2_time = 1;
}

routine1()
{
while(1)
{
  if (task2_time)
  {
    routine2();
    task2_time = 0;
  }
}
}


good days!

List of 5 messages in thread
TopicAuthorDate
Can I solve this?            01/01/70 00:00      
   RE: same old story            01/01/70 00:00      
   RE: Can I solve this?            01/01/70 00:00      
   RE: Can I solve this?            01/01/70 00:00      
      RE: Can I solve this?            01/01/70 00:00      

Back to Subject List