am 082a52b5: Merge "Move libutils over to pthread_gettid_np."
* commit '082a52b57fb6d93186338062c179ffadd871f3c6': Move libutils over to pthread_gettid_np.
This commit is contained in:
commit
e4bf208ce8
2 changed files with 2 additions and 6 deletions
|
|
@ -93,8 +93,7 @@ endif
|
||||||
LOCAL_CFLAGS += -Werror
|
LOCAL_CFLAGS += -Werror
|
||||||
|
|
||||||
LOCAL_C_INCLUDES += \
|
LOCAL_C_INCLUDES += \
|
||||||
bionic/libc \
|
external/zlib
|
||||||
external/zlib
|
|
||||||
|
|
||||||
LOCAL_STATIC_LIBRARIES := \
|
LOCAL_STATIC_LIBRARIES := \
|
||||||
libcutils
|
libcutils
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,6 @@
|
||||||
# include <pthread.h>
|
# include <pthread.h>
|
||||||
# include <sched.h>
|
# include <sched.h>
|
||||||
# include <sys/resource.h>
|
# include <sys/resource.h>
|
||||||
#ifdef HAVE_ANDROID_OS
|
|
||||||
# include <private/bionic_pthread.h>
|
|
||||||
#endif
|
|
||||||
#elif defined(HAVE_WIN32_THREADS)
|
#elif defined(HAVE_WIN32_THREADS)
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
|
|
@ -855,7 +852,7 @@ pid_t Thread::getTid() const
|
||||||
pid_t tid;
|
pid_t tid;
|
||||||
if (mRunning) {
|
if (mRunning) {
|
||||||
pthread_t pthread = android_thread_id_t_to_pthread(mThread);
|
pthread_t pthread = android_thread_id_t_to_pthread(mThread);
|
||||||
tid = __pthread_gettid(pthread);
|
tid = pthread_gettid_np(pthread);
|
||||||
} else {
|
} else {
|
||||||
ALOGW("Thread (this=%p): getTid() is undefined before run()", this);
|
ALOGW("Thread (this=%p): getTid() is undefined before run()", this);
|
||||||
tid = -1;
|
tid = -1;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue