From: Peng Li (pli_cn@yahoo.com)
Date: Thu May 24 2001 - 12:11:52 EDT
Hello,every one, I'm thinking of some special scheduling technique in the uClinux/uCsimm. The technique requires the scheduler abort a task in some cases. For example, a rt task may simply sum from 0 through 1000. The while loop can be regarded as a serial of identical steps: i=0; /* initialization */ i++; i++; ... ... i++; /* i=500 now */ i++; ... ... i++; i++; /* i=1000 here */ However, the scheduler decides to abort the task when it has summed 0 through 500. "Abort" means the program counter(PC) of that task should be reset to the beginning, so that when the task is scheduled next time, it will run from the beginning(i=0) instead of continuing the summation from 500. Meanwhile, no other data in the rt task structure should be changed. It seems asm code could do a good job. For example, the rtl_switch_to()(include/rtl/switch.h) does provide some clues, since it preserves the PC of current task before context switching. But I don't understand the asm code. Could anybody please shed me a light? Thanks. __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/
This archive was generated by hypermail 2.1.4 : Thu Sep 19 2002 - 13:19:44 EDT