schedule_timeout( )

vgo@ratio.de
Thu, 03 Jun 1999 16:57:50 +0200 (MEST)


the function schedule_timeout in sched.c does the following:

expire = timeout + j

init_timer(&timer);
timer.expires = expire;
timer.data = (unsigned long) current;
timer.function = process_timeout;

add_timer(&timer);
schedule();
del_timer(&timer);

timeout = expire - jiffies;

How can the timer expire, when it is deleted
immediate after scheduling?

Is there an other way to set a process sleep like the one in
version 2.0.x

current->timeout = jiffies + t;
current->state = TASK_INTERRUPTIBLE;
schedule();
current->timeout = 0;

TIA
Vasili

----------------------------------
E-Mail: vgo@Ratio.de
Date: 03-Jun-99
Time: 16:47:48

This message was sent by XFMail
----------------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/