diff options
| author | 2011-09-16 11:47:13 -0700 | |
|---|---|---|
| committer | 2011-09-16 11:47:13 -0700 | |
| commit | 9dbb77d04b12a3f45ebd156087f6ccb478b35a87 (patch) | |
| tree | c62b5cf6c6bf63ceeb511ab143ad99a61102c1f5 /libs/utils/Threads.cpp | |
| parent | 50c258b94565bd35e8e115667e72d0bbed4c1ac1 (diff) | |
Fix androidGetThreadPriority for non-pthread configurations.
related-to-build
Change-Id: Ic865af0865906f96fd615a56a030c8e3adaf13c4
Diffstat (limited to 'libs/utils/Threads.cpp')
| -rw-r--r-- | libs/utils/Threads.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/utils/Threads.cpp b/libs/utils/Threads.cpp index 38c4b35a7c..5dbcb75b06 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) |