summaryrefslogtreecommitdiffstats
path: root/libcutils/sched_policy.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcutils/sched_policy.c')
-rw-r--r--libcutils/sched_policy.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libcutils/sched_policy.c b/libcutils/sched_policy.c
index 493511e..dfc8777 100644
--- a/libcutils/sched_policy.c
+++ b/libcutils/sched_policy.c
@@ -37,7 +37,7 @@ static inline SchedPolicy _policy(SchedPolicy p)
return p == SP_DEFAULT ? SP_SYSTEM_DEFAULT : p;
}
-#if defined(HAVE_ANDROID_OS) && defined(HAVE_SCHED_H) && defined(HAVE_PTHREADS)
+#if defined(HAVE_ANDROID_OS)
#include <pthread.h>
#include <sched.h>
@@ -203,11 +203,9 @@ static int getSchedulerGroup(int tid, char* buf, size_t bufLen)
int get_sched_policy(int tid, SchedPolicy *policy)
{
-#ifdef HAVE_GETTID
if (tid == 0) {
tid = gettid();
}
-#endif
pthread_once(&the_once, __initialize);
if (__sys_supports_schedgroups) {
@@ -240,11 +238,9 @@ int get_sched_policy(int tid, SchedPolicy *policy)
int set_sched_policy(int tid, SchedPolicy policy)
{
-#ifdef HAVE_GETTID
if (tid == 0) {
tid = gettid();
}
-#endif
policy = _policy(policy);
pthread_once(&the_once, __initialize);