lkml.org 
[lkml]   [1999]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subjectschedule_timeout() sematics
Date
From
I just fixed a bug in my sonycd535.c driver where I neglected
to set current->state = TASK_INTERRUPTIBLE before I called
schedule_timeout(). While fixing this I was led to wonder:
wouldn't it make sense for schedule_timeout() to set
TASK_INTERRUPIBLE itself? I'm failing to think of a case where
this would not be desirable (but then again, my imagination
isn't working as well as it should be right now).

FWIW: in a quick pass through the drivers/ tree there were only
a few (the lp and some sound drivers) which did not obviously
set current->state = TASK_INTERRUPTIBLE just before the call to
schedule_timeout().


On a related note, while doing the above search, my eye caught
this questionable code fragment in drivers/char/dz.c (at line
1096 in the 2.2.11 version of the source):
schedule_timeout(jiffies + info->close_delay);
Surely this reference to "jiffies" is bogus?

--Ken Pizzini

-
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:53    [W:0.031 / U:1.968 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site