2002-01-04 10:36:33

by Amber Palekar

[permalink] [raw]
Subject: Thread Insomnia !!!

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