Merge "libutils: Remove a little dead code" am: 4a39ba316f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1977026 Change-Id: I7e478b252fbc5a2e79a3a9f307f2befe13c9c20b
This commit is contained in:
commit
0a8e5126ef
1 changed files with 1 additions and 6 deletions
|
@ -299,21 +299,16 @@ void androidSetCreateThreadFunc(android_create_thread_fn func)
|
|||
int androidSetThreadPriority(pid_t tid, int pri)
|
||||
{
|
||||
int rc = 0;
|
||||
int lasterr = 0;
|
||||
int curr_pri = getpriority(PRIO_PROCESS, tid);
|
||||
|
||||
if (curr_pri == pri) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (rc) {
|
||||
lasterr = errno;
|
||||
}
|
||||
|
||||
if (setpriority(PRIO_PROCESS, tid, pri) < 0) {
|
||||
rc = INVALID_OPERATION;
|
||||
} else {
|
||||
errno = lasterr;
|
||||
errno = 0;
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
|
Loading…
Reference in a new issue