summaryrefslogtreecommitdiffstats
path: root/libs/utils
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-09-16 11:47:13 -0700
committerAndreas Huber <andih@google.com>2011-09-16 11:47:13 -0700
commit86d7db52bf0cce0d76abc40cc25bf4f1d96d59cd (patch)
treee17446f644b1ee2f9539fd96205837a42aa5f59a /libs/utils
parent44895fe865a597963a6a4a1fa0af9c3b2ff164d1 (diff)
downloadframeworks_base-86d7db52bf0cce0d76abc40cc25bf4f1d96d59cd.zip
frameworks_base-86d7db52bf0cce0d76abc40cc25bf4f1d96d59cd.tar.gz
frameworks_base-86d7db52bf0cce0d76abc40cc25bf4f1d96d59cd.tar.bz2
Fix androidGetThreadPriority for non-pthread configurations.
related-to-build Change-Id: Ic865af0865906f96fd615a56a030c8e3adaf13c4
Diffstat (limited to 'libs/utils')
-rw-r--r--libs/utils/Threads.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/utils/Threads.cpp b/libs/utils/Threads.cpp
index 38c4b35..5dbcb75 100644
--- a/libs/utils/Threads.cpp
+++ b/libs/utils/Threads.cpp
@@ -369,7 +369,11 @@ int androidSetThreadPriority(pid_t tid, int pri)
}
int androidGetThreadPriority(pid_t tid) {
+#if defined(HAVE_PTHREADS)
return getpriority(PRIO_PROCESS, tid);
+#else
+ return ANDROID_PRIORITY_NORMAL;
+#endif
}
int androidGetThreadSchedulingGroup(pid_t tid)