• 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: How to get the name of an opened semaphore?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get the name of an opened semaphore?


  • Subject: Re: How to get the name of an opened semaphore?
  • From: Peter Lovell <email@hidden>
  • Date: Fri, 24 Jun 2005 07:22:23 -0400


On Jun 23, 2005, at 9:48 PM, Tron Thomas wrote:

It seems that to solve my problem with semaphores and device space, that I should try unlinking the named semaphores when I close them. Opening a semaphore provides a sem_t pointer that can be used to close the semaphore. Unlinking a semaphore, however, requires the name used when opening the semaphore.

How can I obtain the name of the semaphore without having to maintain the relationship between the semaphore name and its corresponding sem_t pointer myself?


You can of course unlink the semaphore before then, depending upon the needs of your application. Once it is unlinked, no-one can open it but the existing semaphore remains available until the last reference is closed. In one instance I have, for example, the semaphore is used between threads so the semaphore is unlinked immediately after being opened. Your case may be different (I don't have your original post here right now).


You might also look in darwin for the source to ipcs and ipcrm. Obviously they can find the names, but it's possible that you'd need root access. However, it might be that you could find the ones you created.

Cheers.....Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >How to get the name of an opened semaphore? (From: Tron Thomas <email@hidden>)

  • Prev by Date: How to get the name of an opened semaphore?
  • Next by Date: Re: cmpxchgl on x86?
  • Previous by thread: How to get the name of an opened semaphore?
  • Next by thread: .hidden gone in Tiger?
  • Index(es):
    • Date
    • Thread