内核高手请进
读内核2.4,有一个获取当前系统时间的函数do_gettimeofday,百思不得其解,望指教void do_gettimeofday(struct timeval *tv)
{
//...微秒变量
usec=do_gettimeoffset();//?
unsigned long lost=jiffies-wall_jiffies ;
usec+=lost*(1000000/HZ);
sec=xtime.tv_sec;
usec+= xtime.tv_usec;
//返回,略写形式
tv={sec,usec};
}
我觉得应该是?处的语句应该去掉才是对的啊, Please read the do_gettimeoffset() carefully. Why do you think this function call should be removed?
这个函数用于得到还不足一个jiffy的past time。。。:)
页:
[1]