Skip to contentSkip to conversation

interruptible_sleep_on_timeout hangs my m/c

DISCUSSION Amber Palekar 1 participant 1 message Jan 4, 2002

lore
Share & tools
lore
#0 lore raw

hi,
i want to do a non-blocking sock_recvmsg in a
module(2.4.4 on an i386) .( i am usign MSG_DONTWAIT for that ) I am doing this inside a kernel thread.After this stmt , i put the thread to sleep by doing :-

while(1)
{
.....
.....
ret = sock_recvmsg(.....,MSG_DONTWAIT); if(ret < 0)

   {
	DECLARE_WAIT_QUEUE_HEAD(wait);
	interruptible_sleep_on_timeout(&wait,HZ);
   }
   else
   {
	/* print the mesg and get out of loop */

}
}
As soon as i insmod this module my m/c just
hangs after it reaches the sleep stmt( i used printk debugging to get this ) Any solutions ????

TIA,
Amber

__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com