分类: LINUX
2006-09-20 14:47:58
Linux Device Drivers, 2nd Edition2nd Edition June 2001 0-59600-008-1, Order Number: 0081 586 pages, $39.95 |
Chapter 6
Flow of TimeContents:
These lines, for example, measure the execution of the instruction itself:
With this macro in place, the MIPS processor can execute the same code shown earlier for the x86.
morgana% cd /proc; cat currentime currentime currentimegettime: 846157215.937221
xtime: 846157215.931188
jiffies: 1308094
gettime: 846157215.939950
xtime: 846157215.931188
jiffies: 1308094
gettime: 846157215.942465
xtime: 846157215.941188
jiffies: 1308095Delaying Execution
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout (jit_delay*HZ);
DECLARE_TASK_QUEUE(tq_custom);
queue_task(&custom_task, &tq_custom);run_task_queue(&tq_custom);
current->timeout = jiffies + timeout;
interruptible_sleep_on(my_queue);
extern inline void schedule_timeout(int timeout)
{
current->timeout = jiffies + timeout;
current->state = TASK_INTERRUPTIBLE;
schedule();
current->timeout = 0;
}This chapter introduced the following symbols:
Back to:
© 2001, O'Reilly & Associates, Inc.