Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
pthread mutex "self aware"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pthread mutex "self aware"?



Hello Mr "Schizophrenic Optimization Scientist", and others

I've tracked down a bug in a an app and related it to a 3rd party db API which is "a lot of platforms compatible".
Talking to the developer, it seems that on "other OS:es", pthread mutexes that you want to acquire and that
already is acquired, but from the same thread let you just "grab'em again", but on
OSX they "dead lock you" if you set the timeout time to WHEN_HELL_FREEZES_OVER.
I think the OSX implementation is correct, but is there a way to "see"
what thread acquired it, so I can resolve any self-induced-deadlocks before they happen?

// Totte

------------------------------------------------------------------------ ------------------------------------
Knowledge, Happiness, and a little Tango.
- Lasse Berghagen
_______________________________________________
mt-smp mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/mt-smp
Do not post admin requests to the list. They will be ignored.


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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.