Messages in this thread | | | Subject | Re: Waking up kernel thread blocked in sock_recvmsg | From | Andi Kleen <> | Date | 09 Oct 2002 01:25:03 +0200 |
| |
"Steven French" <sfrench@us.ibm.com> writes:
> What is the recommended, safe way to wake up a kernel thread blocked in > sock_recvmsg (other than sending data to it or pulling the network cable > out of the wall and generating network errors). I have tried various > approaches in kernel sock_close, sock_release even wake_up_process. When > I want to free my captive kernel threads this thread is typically blocked > in tcp_recv_data (on a blocking read of a tcp v4 socket). I am not certain > that it is not waking up and promptly going back to sleep but it is > certainly not returning to the caller until it really gets data.
You could send it a signal.
Or alternatively use non blocking sockets and sleep yourself on the socket wait queue.
-Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |