Home
last modified time | relevance | path

Searched refs:tid (Results 1 – 25 of 39) sorted by relevance

12

/bionic/libc/bionic/
Dgettid.cpp37 pid_t tid = self->tid; in gettid() local
38 if (__predict_true(tid != -1)) { in gettid()
39 return tid; in gettid()
41 self->tid = syscall(__NR_gettid); in gettid()
42 return self->tid; in gettid()
Dpthread_setschedparam.cpp41 pid_t tid = __pthread_internal_gettid(t, "pthread_setschedparam"); in pthread_setschedparam() local
42 if (tid == -1) return ESRCH; in pthread_setschedparam()
44 return (sched_setscheduler(tid, policy, param) == -1) ? errno : 0; in pthread_setschedparam()
51 pid_t tid = __pthread_internal_gettid(t, "pthread_setschedprio"); in pthread_setschedprio() local
52 if (tid == -1) return ESRCH; in pthread_setschedprio()
55 return (sched_setparam(tid, &param) == -1) ? errno : 0; in pthread_setschedprio()
Dclone.cpp49 if (self && self->tid == -1) { in __start_thread()
50 self->tid = syscall(__NR_gettid); in __start_thread()
92 pid_t caller_tid = self->tid; in clone()
97 self->tid = -1; in clone()
120 self->tid = caller_tid; in clone()
121 } else if (self->tid == -1) { in clone()
122 self->tid = syscall(__NR_gettid); in clone()
123 self->set_cached_pid(self->tid); in clone()
Dpthread_kill.cpp40 pid_t tid = __pthread_internal_gettid(t, "pthread_kill"); in pthread_kill() local
43 if (tid == 0 || tid == -1) return ESRCH; in pthread_kill()
45 return (tgkill(getpid(), tid, sig) == -1) ? errno : 0; in pthread_kill()
Dpthread_getschedparam.cpp39 pid_t tid = __pthread_internal_gettid(t, "pthread_getschedparam"); in pthread_getschedparam() local
40 if (tid == -1) return ESRCH; in pthread_getschedparam()
42 if (sched_getparam(tid, param) == -1) return errno; in pthread_getschedparam()
43 *policy = sched_getscheduler(tid); in pthread_getschedparam()
Dpthread_mutex.cpp149 pid_t tid = __get_thread()->tid; in PIMutexTryLock() local
153 &old_owner, tid, in PIMutexTryLock()
158 if (tid == (old_owner & FUTEX_TID_MASK)) { in PIMutexTryLock()
192 pid_t tid = __get_thread()->tid; in PIMutexUnlock() local
193 int old_owner = tid; in PIMutexUnlock()
206 if (tid != (old_owner & FUTEX_TID_MASK)) { in PIMutexUnlock()
216 if (old_owner == tid) { in PIMutexUnlock()
723 pid_t tid = __get_thread()->tid; in MutexLockWithTimeout() local
724 if (tid == atomic_load_explicit(&mutex->owner_tid, memory_order_relaxed)) { in MutexLockWithTimeout()
742 atomic_store_explicit(&mutex->owner_tid, tid, memory_order_relaxed); in MutexLockWithTimeout()
[all …]
Dpthread_join.cpp57 pid_t tid = thread->tid; in pthread_join() local
58 volatile int* tid_ptr = &thread->tid; in pthread_join()
65 __futex_wait(tid_ptr, tid, nullptr); in pthread_join()
Dpthread_getcpuclockid.cpp36 pid_t tid = __pthread_internal_gettid(t, "pthread_getcpuclockid"); in pthread_getcpuclockid() local
37 if (tid == -1) return ESRCH; in pthread_getcpuclockid()
40 clockid_t result = ~static_cast<clockid_t>(tid) << 3; in pthread_getcpuclockid()
Dpthread_sigqueue.cpp43 pid_t tid = __pthread_internal_gettid(t, "pthread_sigqueue"); in pthread_sigqueue() local
44 if (tid == -1) return ESRCH; in pthread_sigqueue()
52 return syscall(__NR_rt_tgsigqueueinfo, getpid(), tid, sig, &siginfo) ? errno : 0; in pthread_sigqueue()
Draise.cpp38 pid_t tid = syscall(__NR_gettid); in raise() local
39 return tgkill(pid, tid, sig); in raise()
D__libc_init_main_thread.cpp82 main_thread.tid = __getpid(); in __libc_init_main_thread_early()
83 main_thread.set_cached_pid(main_thread.tid); in __libc_init_main_thread_early()
112 __set_tid_address(&main_thread.tid); in __libc_init_main_thread_late()
Dpthread_rwlock.cpp291 if (atomic_load_explicit(&rwlock->writer_tid, memory_order_relaxed) == __get_thread()->tid) { in __pthread_rwlock_timedrdlock()
354 atomic_store_explicit(&rwlock->writer_tid, __get_thread()->tid, memory_order_relaxed); in __pthread_rwlock_trywrlock()
363 if (atomic_load_explicit(&rwlock->writer_tid, memory_order_relaxed) == __get_thread()->tid) { in __pthread_rwlock_timedwrlock()
491 if (atomic_load_explicit(&rwlock->writer_tid, memory_order_relaxed) != __get_thread()->tid) { in pthread_rwlock_unlock()
Dpthread_create.cpp179 if (sched_setscheduler(thread->tid, policy, &param) == -1) { in __init_thread()
322 async_safe_format_buffer(name_buffer, arraysize(name_buffer), "stack_and_tls:%d", thread->tid); in __set_stack_and_tls_vma_name()
412 int rc = clone(__pthread_start, child_stack, flags, thread, &(thread->tid), tls, &(thread->tid)); in pthread_create()
Dfork.cpp41 nullptr, nullptr, nullptr, &(self->tid)); in __clone_for_fork()
Dndk_cruft.cpp232 int tkill(pid_t tid, int sig) { in tkill() argument
233 return syscall(__NR_tkill, tid, sig); in tkill()
/bionic/libc/private/
Dbionic_inline_raise.h42 pid_t tid = syscall(__NR_gettid); variable
51 register long r1 __asm__("r1") = tid;
58 register long x1 __asm__("x1") = tid;
64 syscall(__NR_rt_tgsigqueueinfo, pid, tid, sig, &info);
/bionic/tests/
Dstack_protector_test.cpp43 pid_t tid = gettid(); in Check() local
46 printf("[thread %d] TLS stack guard = %p\n", tid, guard); in Check()
49 ASSERT_TRUE(tids.find(tid) == tids.end()); in Check()
60 tids.insert(tid); in Check()
Dpthread_test.cpp559 pid_t tid = tid_promise.get_future().get(); in TEST() local
560 while (TEMP_FAILURE_RETRY(syscall(__NR_tgkill, getpid(), tid, 0)) != -1) { in TEST()
925 std::atomic<pid_t> tid; member
933 arg->tid = gettid(); in pthread_rwlock_wakeup_helper()
950 wakeup_arg.tid = 0; in test_pthread_rwlock_reader_wakeup_writer()
957 WaitUntilThreadSleep(wakeup_arg.tid); in test_pthread_rwlock_reader_wakeup_writer()
1017 wakeup_arg.tid = 0; in test_pthread_rwlock_writer_wakeup_reader()
1024 WaitUntilThreadSleep(wakeup_arg.tid); in test_pthread_rwlock_writer_wakeup_reader()
1080 arg->tid = gettid(); in pthread_rwlock_wakeup_timeout_helper()
1109 wakeup_arg.tid = 0; in pthread_rwlock_timedrdlock_timeout_helper()
[all …]
Dutils.h142 static inline void WaitUntilThreadSleep(std::atomic<pid_t>& tid) { in WaitUntilThreadSleep() argument
143 while (tid == 0) { in WaitUntilThreadSleep()
146 std::string filename = android::base::StringPrintf("/proc/%d/stat", tid.load()); in WaitUntilThreadSleep()
Dleak_test.cpp136 struct thread_data { pthread_barrier_t* barrier; pid_t* tid; } threads[thread_count]; in TEST() member
147 *data->tid = gettid(); in TEST()
Dsched_test.cpp34 pid_t tid = clone(child_fn, &child_stack[1024], CLONE_VM, &i); in TEST() local
37 ASSERT_EQ(tid, TEMP_FAILURE_RETRY(waitpid(tid, &status, __WCLONE))); in TEST()
/bionic/libc/kernel/uapi/linux/
Di2o-dev.h54 unsigned int tid; member
72 unsigned int tid; member
82 unsigned int tid; member
167 __u32 tid : 12; member
/bionic/libc/malloc_debug/tests/
Dmalloc_debug_system_tests.cpp539 pid_t tid; in TEST() local
540 std::thread thread([&tid, &running] { in TEST()
541 tid = gettid(); in TEST()
557 std::unique_ptr<Backtrace> backtrace(Backtrace::Create(getpid(), tid)); in TEST()
/bionic/libc/kernel/uapi/linux/netfilter/
Dxt_l2tp.h27 __u32 tid; member
/bionic/libc/async_safe/
Dasync_safe_log.cpp500 uint16_t tid = gettid(); in async_safe_write_log() local
501 vec[1].iov_base = &tid; in async_safe_write_log()
502 vec[1].iov_len = sizeof(tid); in async_safe_write_log()

12