am a9235301: Merge "kill HAVE_SCHED_SETSCHEDULER"

* commit 'a9235301ad190814c779a13479b204f01980898f':
  kill HAVE_SCHED_SETSCHEDULER
This commit is contained in:
Yabin Cui
2014-11-10 22:24:03 +00:00
committed by Android Git Automerger

View File

@@ -287,7 +287,8 @@ static void android_os_Process_setCanSelfBackground(JNIEnv* env, jobject clazz,
void android_os_Process_setThreadScheduler(JNIEnv* env, jclass clazz, void android_os_Process_setThreadScheduler(JNIEnv* env, jclass clazz,
jint tid, jint policy, jint pri) jint tid, jint policy, jint pri)
{ {
#ifdef HAVE_SCHED_SETSCHEDULER // linux has sched_setscheduler(), others don't.
#if defined(__linux__)
struct sched_param param; struct sched_param param;
param.sched_priority = pri; param.sched_priority = pri;
int rc = sched_setscheduler(tid, policy, &param); int rc = sched_setscheduler(tid, policy, &param);