ivmai/bdwgc — pull request #53 by ntherning (2014-09-22 13:07:27+00:00)
Title: Use ARM_UNIFIED_THREAD_STATE in the call to thread_get_state() on iOS7 64-bit  and up and iOS8 32-bit and up

Sorry for the noise. I've now tested that other PR on iOS 8 and it fails. It looks like the way to go from iOS 7 and up is to use ARM_UNIFIED_THREAD_STATE. This patch checks the iOS version the app is running on and uses ARM_UNIFIED_THREAD_STATE only if on iOS 7 and up. One weird thing though is that when running on iOS 7 32-bit ARM_UNIFIED_THREAD_STATE doesn't work as expected while the old code does. So this patch will only use ARM_UNIFIED_THREAD_STATE in iOS 7 64-bit and on iOS 8 and up.

Patch tested on iOS 7 32-bit and 64-bit devices and on iOS 8 32-bit device.