Skip to content

Commit 86d7db5

Browse files
committed
Fix androidGetThreadPriority for non-pthread configurations.
related-to-build Change-Id: Ic865af0865906f96fd615a56a030c8e3adaf13c4
1 parent 44895fe commit 86d7db5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libs/utils/Threads.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,11 @@ int androidSetThreadPriority(pid_t tid, int pri)
369369
}
370370

371371
int androidGetThreadPriority(pid_t tid) {
372+
#if defined(HAVE_PTHREADS)
372373
return getpriority(PRIO_PROCESS, tid);
374+
#else
375+
return ANDROID_PRIORITY_NORMAL;
376+
#endif
373377
}
374378

375379
int androidGetThreadSchedulingGroup(pid_t tid)

0 commit comments

Comments
 (0)