On Wednesday, April 30, 2003, at 1:02 PM, Dave Koziol wrote: Can anyone point out anywhere in Darwin where this is used? Is this a "safe" facility to use? As Godfrey pointed out, the specific thread context you are in when calling this is critical. I guess the biggest question is: "Are you sure that blocking thread won't need to make forward progress itself in order to complete the RPC?" If you look at the Mach exception message delivery code (MIG-generated at BUILD/obj/RELEASE_<arch>/osfmk/RELEASE/mach/exc_user.c), you'll see that it uses this routine. A thread that takes an exception effectively is made to sequentially RPC to each of its registered exception handlers until one of them handles it. I need to perform some RPC calls from a KEXT into a user process, and block waiting for the results. This routine appears to do exactly that... This routine, like so many that part of the implementation of Mach, also deals with raw (naked) mach port rights. The code to manipulate these rights aren't really intended for public use. IOKit does some of the magic for you if you are using its UserClient facility. But those are most often used with mach_msg_send_from_kernel() to deliver one-way messages from within IOKit family drivers. But in either case, there is work planned to encapsulate that port right handling and the calling of the message delivery functions for IOKit clients. When available, we would really prefer that these be used instead of the raw Mach primitives. --Jim _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Jim Magee