From 9dbb77d04b12a3f45ebd156087f6ccb478b35a87 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Fri, 16 Sep 2011 11:47:13 -0700 Subject: [PATCH] Fix androidGetThreadPriority for non-pthread configurations. related-to-build Change-Id: Ic865af0865906f96fd615a56a030c8e3adaf13c4 --- libs/utils/Threads.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/utils/Threads.cpp b/libs/utils/Threads.cpp index 38c4b35a7..5dbcb75b0 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)