Re: mach_msg and mach_msg_type_t missing
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com This sounds like a real bad idea. S+E -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Technical Support * Networking, Communications, Hardware _______________________________________________ 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... At 23:45 +1000 26/10/04, Matt Connolly wrote: Any help, or pointers to some more detailed documentation for using mach_msg to communicate from the kernel to a user client would be much appreciated. 1. In general, trying to 'call' from kernel space to user space is a bad idea. You have to be really careful that you don't run the kernel out of resources, or put the kernel in a position where it's waiting, potentially forever, for user space. A much better design is to have your user space agent call into the kernel and ask it "Is there anything to do?" If there's nothing to do, it blocks. You can implement this model via a UNIX domain socket or with an I/O Kit user client, depending on what part of the kernel you're running in. Of course, you still have to design the kernel code so that it can't consume unbounded resources. 2. Sending Mach messages from kernel space to user space is particularly tricky. Jim Magee has talked about this on the list in the past. If you Google for "site:lists.apple.com Jim Magee naked" (*snicker*), you'll find his posts. Can you give me a high-level description of what you're trying to do? Perhaps I can suggest the right direction to proceed. This email sent to site_archiver@lists.apple.com
participants (1)
-
Quinn