aboutsummaryrefslogtreecommitdiff
path: root/libc/bionic/pthread_getcpuclockid.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-03-19 14:19:19 -0700
committerYabin Cui <yabinc@google.com>2015-03-23 19:03:49 -0700
commit673b15e4ee2c6d99b150aedddc0f389e29f98e1b (patch)
treeedc101b54c689960bdf1262e6378b21082d3e277 /libc/bionic/pthread_getcpuclockid.cpp
parent4149dc944bbe3c5f1c14fc998106975e68bdd6bf (diff)
Let g_thread_list_lock only protect g_thread_list.
As glibc/netbsd don't protect access to thread struct members by a global lock, we don't want to do it either. This change reduces the responsibility of g_thread_list_lock to only protect g_thread_list. Bug: 19636317 Change-Id: I897890710653dac165d8fa4452c7ecf74abdbf2b
Diffstat (limited to 'libc/bionic/pthread_getcpuclockid.cpp')
-rw-r--r--libc/bionic/pthread_getcpuclockid.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/bionic/pthread_getcpuclockid.cpp b/libc/bionic/pthread_getcpuclockid.cpp
index d11f56a2a..2bf200480 100644
--- a/libc/bionic/pthread_getcpuclockid.cpp
+++ b/libc/bionic/pthread_getcpuclockid.cpp
@@ -28,11 +28,11 @@
#include <errno.h>
-#include "pthread_accessor.h"
+#include "pthread_internal.h"
int pthread_getcpuclockid(pthread_t t, clockid_t* clockid) {
- pthread_accessor thread(t);
- if (thread.get() == NULL) {
+ pthread_internal_t* thread = __pthread_internal_find(t);
+ if (thread == NULL) {
return ESRCH;
}