diff options
author | dimitry <dimitry@google.com> | 2019-04-25 16:23:53 +0200 |
---|---|---|
committer | dimitry <dimitry@google.com> | 2019-04-26 10:27:00 +0200 |
commit | 62b214dc87ce76055a21a6f5b9b4fdf37bea1952 (patch) | |
tree | a52e075eb79f1977cb075fad5dbbf3c438b335a0 | |
parent | b7944a3b2d0e53ba0b82c017e4e5a85ea0f912ac (diff) | |
download | android_bionic-62b214dc87ce76055a21a6f5b9b4fdf37bea1952.tar.gz android_bionic-62b214dc87ce76055a21a6f5b9b4fdf37bea1952.tar.bz2 android_bionic-62b214dc87ce76055a21a6f5b9b4fdf37bea1952.zip |
Make pthread_get/setschedparam weak for native bridge
Bug: http://b/130825973
Test: run affected app on cuttlefish
Change-Id: I776f26f5eaebdfdb1256ff621bd05ef5a90b852a
(cherry picked from commit c7b81108b48d213ef3eb8f296440ada893e9ac5d)
-rw-r--r-- | libc/bionic/pthread_getschedparam.cpp | 2 | ||||
-rw-r--r-- | libc/bionic/pthread_setschedparam.cpp | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/libc/bionic/pthread_getschedparam.cpp b/libc/bionic/pthread_getschedparam.cpp index ed1853bdc..765287fa4 100644 --- a/libc/bionic/pthread_getschedparam.cpp +++ b/libc/bionic/pthread_getschedparam.cpp @@ -28,9 +28,11 @@ #include <errno.h> +#include "private/bionic_defs.h" #include "private/ErrnoRestorer.h" #include "pthread_internal.h" +__BIONIC_WEAK_FOR_NATIVE_BRIDGE int pthread_getschedparam(pthread_t t, int* policy, sched_param* param) { ErrnoRestorer errno_restorer; diff --git a/libc/bionic/pthread_setschedparam.cpp b/libc/bionic/pthread_setschedparam.cpp index 8a0272868..656fe3208 100644 --- a/libc/bionic/pthread_setschedparam.cpp +++ b/libc/bionic/pthread_setschedparam.cpp @@ -30,9 +30,11 @@ #include <pthread.h> #include <sched.h> +#include "private/bionic_defs.h" #include "private/ErrnoRestorer.h" #include "pthread_internal.h" +__BIONIC_WEAK_FOR_NATIVE_BRIDGE int pthread_setschedparam(pthread_t t, int policy, const sched_param* param) { ErrnoRestorer errno_restorer; @@ -42,6 +44,7 @@ int pthread_setschedparam(pthread_t t, int policy, const sched_param* param) { return (sched_setscheduler(tid, policy, param) == -1) ? errno : 0; } +__BIONIC_WEAK_FOR_NATIVE_BRIDGE int pthread_setschedprio(pthread_t t, int priority) { ErrnoRestorer errno_restorer; |