lkml.org 
[lkml]   [1999]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectschedule_timeout( )
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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.054 / U:1.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site