• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: mach_msg and mach_msg_type_t missing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mach_msg and mach_msg_type_t missing


  • Subject: Re: mach_msg and mach_msg_type_t missing
  • From: Quinn <email@hidden>
  • Date: Thu, 28 Oct 2004 00:01:44 +0100

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.

This sounds like a real bad idea.

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.

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      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >mach_msg and mach_msg_type_t missing (From: Matt Connolly <email@hidden>)

  • Prev by Date: Re: Very poor PPP interface performance
  • Next by Date: Re: [APPL:DarwinKernel] Re: type sizes
  • Previous by thread: mach_msg and mach_msg_type_t missing
  • Next by thread: Very poor PPP interface performance
  • Index(es):
    • Date
    • Thread