• 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: Question: What is the impact of changing .cpp AudioUnitEffectsource to .mm
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question: What is the impact of changing .cpp AudioUnitEffectsource to .mm


  • Subject: Re: Question: What is the impact of changing .cpp AudioUnitEffectsource to .mm
  • From: "Paul Sanders" <email@hidden>
  • Date: Mon, 21 Jun 2010 08:45:44 +0100

OK, thanks very much.  It looks like method resolution is the only time objc_msgSend can block so it is possible to use objC calls in an IOProc if one takes a bit of care, which is what I wanted to establish.  I imagine there are people out there who want to know this.
 
Regards,
 
Paul Sanders.
 
----- Original Message -----
From: Stephen F. Booth
To: Paul Sanders
Cc: email@hidden
Sent: Sunday, June 20, 2010 11:04 PM
Subject: Re: Question: What is the impact of changing .cpp AudioUnitEffectsource to .mm

 
objc_msgSend can block when it is called for the first time for a particular class/selector combination (see http://www.friday.com/bbum/2010/02/04/objc_msgsend-tour-part-4-method-lookup-some-odds-and-ends/). When this path of objc_msgSend is taken the method is resolved and cached (as you said), and the relevant +initialize methods are called where a lock is taken to ensure thread-safety (see http://www.friday.com/bbum/2009/09/06/iniailize-can-be-executed-multiple-times-load-not-so-much/). So depending on how your Objective-C classes are written the hit could be minimal or substantial.

I don't know if this is the only time that objc_msgSend might block, but if you are an assembly wizard (I'm not!) the code is available at http://www.opensource.apple.com/source/objc4/objc4-437.1/runtime/Messengers.subproj/objc-msg-x86_64.s

Stephen
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Question: What is the impact of changing .cpp AudioUnitEffectsource to .mm
      • From: William Stewart <email@hidden>
References: 
 >Question: What is the impact of changing .cpp AudioUnitEffect source to .mm (From: Motti Shneor <email@hidden>)
 >Re: Question: What is the impact of changing .cpp AudioUnitEffect source to .mm (From: Brian Willoughby <email@hidden>)
 >Re: Question: What is the impact of changing .cpp AudioUnitEffect source to .mm (From: Kyle Sluder <email@hidden>)
 >Re: Question: What is the impact of changing .cpp AudioUnitEffectsource to .mm (From: "Paul Sanders" <email@hidden>)
 >Re: Question: What is the impact of changing .cpp AudioUnitEffectsource to .mm (From: "Stephen F. Booth" <email@hidden>)

  • Prev by Date: Re: Question: What is the impact of changing .cpp AudioUnitEffect source to .mm
  • Next by Date: Re: Question: What is the impact of changing .cpp AudioUnitEffect source to .mm
  • Previous by thread: Re: Question: What is the impact of changing .cpp AudioUnitEffectsource to .mm
  • Next by thread: Re: Question: What is the impact of changing .cpp AudioUnitEffectsource to .mm
  • Index(es):
    • Date
    • Thread