]> git.saurik.com Git - apple/libc.git/blobdiff - sys/OSThermalNotification.c
Libc-1353.11.2.tar.gz
[apple/libc.git] / sys / OSThermalNotification.c
index d9afebfaa10f29b06508294e7735adefad95f6b9..36b0042a96426db35f8adc5a13caab8e9c43f83f 100644 (file)
  * @APPLE_LICENSE_HEADER_END@
  */
 
-#include <dispatch/dispatch.h>
 #include <libkern/OSThermalNotification.h>
+
+#include <TargetConditionals.h>
+
+#define OSThermalPressureLevelName             "com.apple.system.thermalpressurelevel"
+const char * const kOSThermalNotificationPressureLevelName = OSThermalPressureLevelName;
+
+#if TARGET_OS_IPHONE
+
+#include <dispatch/dispatch.h>
 #include <notify.h>
 
 #define OSThermalAlert      "com.apple.system.thermalalert"
 #define OSThermalDecision   "com.apple.system.thermaldecision"
 #define OSThermalStatusName "com.apple.system.thermalstatus"
-#define OSThermalPressureLevelName             "com.apple.system.thermalpressurelevel"
 
 const char * const kOSThermalNotificationAlert    = OSThermalAlert;
 const char * const kOSThermalNotificationDecision = OSThermalDecision;
 const char * const kOSThermalNotificationName     = OSThermalStatusName;
-const char * const kOSThermalNotificationPressureLevelName = OSThermalPressureLevelName;
 
 static const char * const kOSThermalMitigationNames[kOSThermalMitigationCount] = {
        OSThermalStatusName,
@@ -114,3 +120,5 @@ OSThermalNotificationLevel OSThermalNotificationCurrentLevel(void)
        // Not ready returns -1, which should not be equal or greater than any other thermal state. 
        return OSThermalNotificationLevelAny;
 }
+
+#endif // TARGET_OS_IPHONE