diff options
| author | Srinath Sridharan <srinathsr@google.com> | 2016-07-21 16:00:39 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-07-21 16:00:40 +0000 |
| commit | 6c92c0eb5c8db2a3f3aee5bc73656a135b79d830 (patch) | |
| tree | 891b253f64aa1105f92bf954d333e95ad6f7209a /core/java/android | |
| parent | 0eadbe6d369844485d36e45f2b4ca9770828ae52 (diff) | |
| parent | 1b15d13243d7e7f672713f21f0c46d88c3c067a2 (diff) | |
Merge "Adding a new getThreadScheduler() method." into nyc-mr1-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/os/Process.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java index 57b40e559ccd..4ef882e1aa78 100644 --- a/core/java/android/os/Process.java +++ b/core/java/android/os/Process.java @@ -16,6 +16,7 @@ package android.os; +import android.annotation.TestApi; import android.net.LocalSocket; import android.net.LocalSocketAddress; import android.system.Os; @@ -1068,6 +1069,24 @@ public class Process { throws IllegalArgumentException; /** + * Return the current scheduling policy of a thread, based on Linux. + * + * @param tid The identifier of the thread/process to get the scheduling policy. + * + * @throws IllegalArgumentException Throws IllegalArgumentException if + * <var>tid</var> does not exist, or if <var>priority</var> is out of range for the policy. + * @throws SecurityException Throws SecurityException if your process does + * not have permission to modify the given thread, or to use the given + * scheduling policy or priority. + * + * {@hide} + */ + + @TestApi + public static final native int getThreadScheduler(int tid) + throws IllegalArgumentException; + + /** * Set the scheduling policy and priority of a thread, based on Linux. * * @param tid The identifier of the thread/process to change. @@ -1082,6 +1101,7 @@ public class Process { * * {@hide} */ + public static final native void setThreadScheduler(int tid, int policy, int priority) throws IllegalArgumentException; |
