• 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: Thread locks in 10.3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Thread locks in 10.3


  • Subject: RE: Thread locks in 10.3
  • From: "Carl Smith" <email@hidden>
  • Date: Wed, 18 Oct 2006 13:53:24 -0400
  • Thread-topic: Thread locks in 10.3

Michael-

 

Thanks so much for the reply.

 

You answered my main question now you raise a new question for me.

 

If I want to protect code critical regions, is there a different method I should be using instead of lck_mtx_lock, or do I have to worry about each and every data object that I am processing?

 

I guess in retrospect I could some direction where to read up on the 10.4 locking design. If anyone knows where I could find this document and or some examples I would appreciate it.

 

Carl

 


From: Michael Smith
Sent: Wednesday, October 18, 2006 1:36 PM
Cc: email@hidden
Subject: Re: Thread locks in 10.3

 

 

On Oct 18, 2006, at 9:17 AM, Carl Smith wrote:

I have a network kernel extension I am using in 10.3. I also have the same extension in 10.4 which is working fine. I have some several threads going from the Application side that call into the kernel so in 10.4 I lock the portions I am calling using lck_mtx_lock in the extension.

My question is, for 10.3 is thread_funnel_set the same as the lck_mtx_lock call in 10.4? And am I approaching the locking of an extension call the correct way using lck_mtx_lock in 10.4 and thread_funnel_set in 10.3?

 

The suspicion I would have from the way you've worded the above is that you are using a mutex in the same fashion as the old funnel; to guard code critical regions.

 

The locking design in 10.4 emphasises protection of data objects, not codepaths; this means that the strict answer to your first question is no, the two are not necessarily analagous.  

 

To answer your second question, yes, those are the right calls to be making, but you should be using them in entirely different ways. 

 

HTH

 

 = Mike

 _______________________________________________
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: Thread locks in 10.3
      • From: Michael Smith <email@hidden>
  • Prev by Date: Re: BSD Flags further
  • Next by Date: Re: BSD Flags further
  • Previous by thread: Re: Thread locks in 10.3
  • Next by thread: Re: Thread locks in 10.3
  • Index(es):
    • Date
    • Thread