Merge "Adding a new getThreadScheduler() method." into nyc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6c92c0eb5c
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.os;
|
||||
|
||||
import android.annotation.TestApi;
|
||||
import android.net.LocalSocket;
|
||||
import android.net.LocalSocketAddress;
|
||||
import android.system.Os;
|
||||
@@ -1067,6 +1068,24 @@ public class Process {
|
||||
public static final native int getThreadPriority(int tid)
|
||||
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.
|
||||
*
|
||||
@@ -1082,6 +1101,7 @@ public class Process {
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
|
||||
public static final native void setThreadScheduler(int tid, int policy, int priority)
|
||||
throws IllegalArgumentException;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user