Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What is causing this deadlock?



Folks, Greetings!

A co-worker moved some code onto a separate thread. Doing so took some of our audio input code off the main thread as well, something that I would have thought was okay. But I was wrong.

Every so often the problem arises right after we've taken hog mode successfully. You can see in the stack of the work thread: AudioDeviceSetProperty >> HALObject::SetPropertyData >> HALPlugIn::ObjectSetPropertyData >> IOA_SingleDevice::SetPropertyData >> HP_HogMode::Take >> IOA_SingleDevice::HogModeStateChanged >> CAMutex::Lock >> pthread_mutex_lock >> semaphore_wait_signal_trap

Over on the main thread, you see the following in the stack: CFRunLoopRunSpecific >> __CFMachPortPerform >> IOA_HWDevice::MachPortCallBack >> IOA_SingleDevice::HWDevice_FormatChanged >> CAMutex::Lock >> pthread_mutex_lock >> semaphore_wait_signal_trap

Some questions that occurred to me, partially based on conjecture: Why is the IOA_SingleDevice notifying itself? Why is Hog mode being notified as a format change? Is the same CAMutex instance used in both IOA_SingleDevice methods? What am I doing wrong?

Peace,
Bob
--

Chop wood, carry water.
	- zen saying
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.