diff options
| author | Mister Oyster <oysterized@gmail.com> | 2018-01-07 13:51:41 +0100 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2018-01-07 13:51:41 +0100 |
| commit | 6470d7e9300829516b6fbe155082cc9ff11bf867 (patch) | |
| tree | a764e5597d757b2499acd71d26c9c3a5f41dee81 /libshims | |
| parent | cc930e44058118d3f87bdc11fc8a1837d7d66b6f (diff) | |
libshim: add '__pthread_gettid' shim for MM/3.18-based mediatek devices
Based off https://github.com/ashwinr64/android_device_motorola_taido
shim
Diffstat (limited to 'libshims')
| -rw-r--r-- | libshims/Android.mk | 11 | ||||
| -rw-r--r-- | libshims/misc/bionic.cpp | 24 |
2 files changed, 35 insertions, 0 deletions
diff --git a/libshims/Android.mk b/libshims/Android.mk index b5c764e..0fab3ed 100644 --- a/libshims/Android.mk +++ b/libshims/Android.mk @@ -29,6 +29,17 @@ LOCAL_CFLAGS := -O3 -Wno-unused-variable -Wno-unused-parameter LOCAL_PROPRIETARY_MODULE := true include $(BUILD_SHARED_LIBRARY) + +## libshim_bionic +include $(CLEAR_VARS) +LOCAL_SRC_FILES := bionic.cpp +LOCAL_MODULE := libshims_bionic +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := SHARED_LIBRARIES +LOCAL_SHARED_LIBRARIES := libc +include $(BUILD_SHARED_LIBRARY) + + ## libshim_omx include $(CLEAR_VARS) diff --git a/libshims/misc/bionic.cpp b/libshims/misc/bionic.cpp new file mode 100644 index 0000000..f92ec52 --- /dev/null +++ b/libshims/misc/bionic.cpp @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2017 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <pthread.h> + +extern "C" { +pid_t __pthread_gettid(pthread_t t) { + return pthread_gettid_np(t); + } +} + |
