• 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
socket creation synchronization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

socket creation synchronization


  • Subject: socket creation synchronization
  • From: Christopher Vitale <email@hidden>
  • Date: Mon, 05 Dec 2005 16:30:10 -0500
  • Thread-topic: socket creation synchronization

Hello List,

I have a question about socket creation in 10.4.3.

You can arrive at socreate by calling the kpi sock_socket, or from the
userland syscall socket. Regardless, socreate calls pffindproto or
pffindtype. These domain functions both assert that nobody else is holding a
certain lock. How is this guaranteed? There isn't even a funnel associated
with the socket syscall in syscalls.master. I looked around the source for a
while but nothing jumped out at me.

I'm interested because I've got a kext that creates a connection via
sock_socket. When I call sock_socket while other (userland) sockets are
being created I'll occasionally die a horrible death on the pffindproto lock
assert. I'll only create a single connection for the life of the kext. Does
socket creation in the kernel bypass synchronization at a higher level?

Also, the socket I create is a system socket to another kext. Is this an
appropriate way for kexts to share information? I take the necessary
precautions like not allowing the server kext to unload while connected,
forcing the client kext to disconnect when unloaded, etc.

Thanks,

vitale

 _______________________________________________
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

  • Follow-Ups:
    • Re: socket creation synchronization
      • From: Christopher Vitale <email@hidden>
    • Re: socket creation synchronization
      • From: Josh Graessley <email@hidden>
  • Prev by Date: Re: Kern-control and enqueuing data
  • Next by Date: Re: socket creation synchronization
  • Previous by thread: Re: Kern-control and enqueuing data
  • Next by thread: Re: socket creation synchronization
  • Index(es):
    • Date
    • Thread