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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/01/04 13:04
Read: times


 
#76751 - Excellent idea
Responding to: ???'s previous message
When a task has determined that it has nothing (yet) to do, to give up its share. I had implemented an exit() system call that does two things:

1. Sets th0 to 0xff, and tl0 to 0xf0, thereby causing an imminent timer0 overflow
2. Sets its run state to EXIT

What you are suggesting, and I have added is to just do #1. That way whatever timer0 was at would get "fast forwarded" to the end.

The only thing is that it would interfere with a real-time clock, if one were running at the time. Perhaps a better solution would be to set the timer0 interrupt flag, so that the timer0 wouldn't get modified, and whatever time was left on the clock, would be contributed to the next task.

-Keith

List of 5 messages in thread
TopicAuthorDate
Calculating task priority            01/01/70 00:00      
   Another welcome feature...            01/01/70 00:00      
      Excellent idea            01/01/70 00:00      
   RE: Calculating task priority            01/01/70 00:00      
   RE: Calculating task priority            01/01/70 00:00      

Back to Subject List