RE: Use of asynchronous receive at kernel level
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Thu, 15 May 2008, Eddy Quicksall wrote: But there is only one upcall function per socket and there does not seem to be any way to tell what the upcall is for. Is there something I'm missing? I'm not sure about xnu-1228, but in the bad old days the upcall function couldn't tsleep(), so it basically would try and build up an RPC request without blocking. If it had to block or once all of an RPC request was received, it would wake up an nfsd thread to do the work. And, yes, you can only have one upcall function associated with a TCP socket, so you'll have to do whatever you want to do in that function, or wake up other threads in the kernel to do the work. Good luck with it, rick _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... The upcall was added to 4.3BSD back in the late 80s (I had more hair then, but never wore disco boots:-). It was specifically for the nfs server. The upcall is called whenever data is added to the receive queue for the TCP socket. If you want to read data off the socket, you have to do a soreceive() etc. Take a look at the nfs server sources in xnu-1228 to see how the nfsd uses it. (xnu-1228/bsd/nfs/nfs_socket.c) This email sent to site_archiver@lists.apple.com
participants (1)
-
Rick Macklem