]> git.saurik.com Git - apple/xnu.git/blobdiff - libsyscall/wrappers/libproc/libproc_internal.h
xnu-4903.270.47.tar.gz
[apple/xnu.git] / libsyscall / wrappers / libproc / libproc_internal.h
index 513fda9ba682ae0e2312e97f8406df3135c4988c..1f4bc60da33b19fe0bd8dd97471510a22048e0f8 100644 (file)
@@ -2,14 +2,14 @@
  * Copyright (c) 2010-2018 Apple Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
- * 
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
  * compliance with the License. Please obtain a copy of the License at
  * http://www.opensource.apple.com/apsl/ and read it before using this
  * file.
- * 
+ *
  * The Original Code and all software distributed under the License are
  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
@@ -17,7 +17,7 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- * 
+ *
  * @APPLE_LICENSE_HEADER_END@
  */
 #ifndef _LIBPROC_INTERNALH_
@@ -32,8 +32,8 @@
 __BEGIN_DECLS
 
 /* CPU monitor action */
-#define PROC_SETCPU_ACTION_NONE                0
-#define PROC_SETCPU_ACTION_THROTTLE    1
+#define PROC_SETCPU_ACTION_NONE         0
+#define PROC_SETCPU_ACTION_THROTTLE     1
 
 int proc_setcpu_percentage(pid_t pid, int action, int percentage) __OSX_AVAILABLE_STARTING(__MAC_10_12_2, __IPHONE_5_0);
 int proc_clear_cpulimits(pid_t pid) __OSX_AVAILABLE_STARTING(__MAC_10_12_2, __IPHONE_5_0);
@@ -44,29 +44,29 @@ int proc_setthread_cpupercent(uint8_t percentage, uint32_t ms_refill) __OSX_AVAI
 #if TARGET_OS_EMBEDDED
 
 /* CPU monitor action, continued */
-#define PROC_SETCPU_ACTION_SUSPEND     2
-#define PROC_SETCPU_ACTION_TERMINATE   3
-#define PROC_SETCPU_ACTION_NOTIFY      4
+#define PROC_SETCPU_ACTION_SUSPEND      2
+#define PROC_SETCPU_ACTION_TERMINATE    3
+#define PROC_SETCPU_ACTION_NOTIFY       4
 
 int proc_setcpu_deadline(pid_t pid, int action, uint64_t deadline) __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_5_0);
 int proc_setcpu_percentage_withdeadline(pid_t pid, int action, int percentage, uint64_t deadline) __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_5_0);
 
-#define PROC_APPSTATE_NONE             0
-#define PROC_APPSTATE_ACTIVE           1
-#define PROC_APPSTATE_BACKGROUND       2
-#define PROC_APPSTATE_NONUI            3
-#define PROC_APPSTATE_INACTIVE         4
+#define PROC_APPSTATE_NONE              0
+#define PROC_APPSTATE_ACTIVE            1
+#define PROC_APPSTATE_BACKGROUND        2
+#define PROC_APPSTATE_NONUI             3
+#define PROC_APPSTATE_INACTIVE          4
 
 int proc_setappstate(int pid, int appstate);
 int proc_appstate(int pid, int * appstatep);
 
-#define PROC_DEVSTATUS_SHORTTERM       1
-#define PROC_DEVSTATUS_LONGTERM                2
+#define PROC_DEVSTATUS_SHORTTERM        1
+#define PROC_DEVSTATUS_LONGTERM         2
 
 int proc_devstatusnotify(int devicestatus);
 
-#define PROC_PIDBIND_CLEAR     0
-#define PROC_PIDBIND_SET       1
+#define PROC_PIDBIND_CLEAR      0
+#define PROC_PIDBIND_SET        1
 int proc_pidbind(int pid, uint64_t threadid, int bind);
 
 /*
@@ -105,7 +105,7 @@ int proc_clear_delayidlesleep(void);
 #define PROC_POLICY_OSX_APPTYPE_WIDGET          2       /* for dashboard client */
 #define PROC_POLICY_OSX_APPTYPE_DASHCLIENT      2       /* rename to move away from widget */
 
-/* 
+/*
  * Resumes the backgrounded TAL or dashboard client. Only priv users can disable TAL apps.
  * Valid apptype are PROC_POLICY_OSX_APPTYPE_DASHCLIENT and PROC_POLICY_OSX_APPTYPE_TAL.
  * Returns 0 on success otherwise appropriate error code.
@@ -121,8 +121,8 @@ int proc_donate_importance_boost(void);
 /* DEPRECATED: supported for backward compatibility only */
 /* check the message for an importance boost and take an assertion on it */
 int proc_importance_assertion_begin_with_msg(mach_msg_header_t  *msg,
-                                            mach_msg_trailer_t *trailer,
-                                            uint64_t *assertion_token) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_10, __IPHONE_6_0, __IPHONE_8_0);
+    mach_msg_trailer_t *trailer,
+    uint64_t *assertion_token) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_10, __IPHONE_6_0, __IPHONE_8_0);
 
 /* DEPRECATED: supported for backward compatibility only */
 /* drop an assertion */
@@ -130,7 +130,7 @@ int proc_importance_assertion_complete(uint64_t assertion_handle);
 
 /* check the message for a App De-Nap boost and take an assertion on it */
 int proc_denap_assertion_begin_with_msg(mach_msg_header_t  *msg,
-                                       uint64_t *assertion_token);
+    uint64_t *assertion_token);
 
 /* drop a de-nap assertion */
 int proc_denap_assertion_complete(uint64_t assertion_handle);
@@ -156,7 +156,7 @@ int proc_reset_footprint_interval(pid_t pid) __OSX_AVAILABLE_STARTING(__MAC_10_1
 int proc_trace_log(pid_t pid, uint64_t uniqueid) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);
 
 /* proc_info call to get the originator information */
-int proc_pidoriginatorinfo(int flavor,  void *buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);
+int proc_pidoriginatorinfo(int flavor, void *buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);
 
 int proc_listcoalitions(int flavor, int coaltype, void *buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_8_3);
 
@@ -173,4 +173,3 @@ int proc_suppress(pid_t pid, uint64_t *generation);
 __END_DECLS
 
 #endif /* _LIBPROC_INTERNALH_ */
-