摘要:
在线程调度里可以看到,需要调用函数KiSwapContext来进行运行环境切换,由于每个CPU都是只能运行一个线程,而多个线程在运行过程中被中断了,那么就需要保存CPU所有寄存器,以便下一次恢复线程时可以接续运行。现在就来分析这个函数是怎么样实现这些工作的,代码如下:#001 /*++#002 * KiSwapContext #003 *#004 *The KiSwapContext routine switches context to another thread.#005 *#006 * Params:#007 *TargetThread - Pointer to the KTHREAD 阅读全文
posted @ 2009-07-21 21:27
ajuanabc
阅读(176)
评论(0)
推荐(0)
浙公网安备 33010602011771号