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()
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()
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()
Dsys_thread_properties.cpp74 static inline __always_inline bionic_tcb* __get_bionic_tcb_for_thread(pid_t tid) { in __get_bionic_tcb_for_thread() argument
76 if (gettid() == tid) return __get_bionic_tcb(); in __get_bionic_tcb_for_thread()
84 uintptr_t fs_base = ptrace(PTRACE_PEEKUSER, tid, offsetof(user_regs_struct, fs_base), nullptr); in __get_bionic_tcb_for_thread()
96 if (ptrace(PTRACE_GETREGSET, tid, NT_PRSTATUS, &pt_iov) == 0) { in __get_bionic_tcb_for_thread()
99 if (ptrace(PTRACE_GET_THREAD_AREA, tid, u_info.entry_number, &u_info) == 0) { in __get_bionic_tcb_for_thread()
109 if (ptrace(PTRACE_GETREGSET, tid, NT_ARM_TLS, &pt_iov) == 0) { in __get_bionic_tcb_for_thread()
113 if (ptrace(PTRACE_GET_THREAD_AREA, tid, nullptr, &tp_reg) != 0) { in __get_bionic_tcb_for_thread()
127 void __libc_iterate_dynamic_tls(pid_t tid, in __libc_iterate_dynamic_tls() argument
132 bionic_tcb* const tcb = __get_bionic_tcb_for_thread(tid); in __libc_iterate_dynamic_tls()
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()
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 …]
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()
125 __set_tid_address(&main_thread.tid); in __libc_init_main_thread_late()
Dfork.cpp42 nullptr, nullptr, nullptr, &(self->tid)); in __clone_for_fork()
Dpthread_internal.cpp88 return thread ? thread->tid : -1; in __pthread_internal_gettid()
176 if (tgkill(my_pid, t->tid, BIONIC_SIGNAL_RUN_ON_ALL_THREADS) == 0) { in android_run_on_all_threads()
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.cpp181 if (sched_setscheduler(thread->tid, policy, &param) == -1) { in __init_thread()
324 async_safe_format_buffer(name_buffer, arraysize(name_buffer), "stack_and_tls:%d", thread->tid); in __set_stack_and_tls_vma_name()
432 int rc = clone(__pthread_start, child_stack, flags, thread, &(thread->tid), tls, &(thread->tid)); in pthread_create()
/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;
66 register long rsi __asm__("rsi") = tid;
75 syscall(__NR_rt_tgsigqueueinfo, pid, tid, sig, &info);
/bionic/tests/
Dstack_protector_test.cpp44 pid_t tid = gettid(); in Check() local
47 printf("[thread %d] TLS stack guard = %p\n", tid, guard); in Check()
50 ASSERT_TRUE(tids.find(tid) == tids.end()); in Check()
61 tids.insert(tid); in Check()
Dleak_test.cpp134 struct thread_data { pthread_barrier_t* barrier; pid_t* tid; } threads[thread_count]; in TEST() member
145 *data->tid = gettid(); in TEST()
Dutils.h155 static inline void WaitUntilThreadSleep(std::atomic<pid_t>& tid) { in WaitUntilThreadSleep() argument
156 while (tid == 0) { in WaitUntilThreadSleep()
159 std::string filename = android::base::StringPrintf("/proc/%d/stat", tid.load()); in WaitUntilThreadSleep()
Dpthread_test.cpp558 pid_t tid = tid_promise.get_future().get(); in TEST() local
559 while (TEMP_FAILURE_RETRY(syscall(__NR_tgkill, getpid(), tid, 0)) != -1) { in TEST()
924 std::atomic<pid_t> tid; member
932 arg->tid = gettid(); in pthread_rwlock_wakeup_helper()
949 wakeup_arg.tid = 0; in test_pthread_rwlock_reader_wakeup_writer()
956 WaitUntilThreadSleep(wakeup_arg.tid); in test_pthread_rwlock_reader_wakeup_writer()
1016 wakeup_arg.tid = 0; in test_pthread_rwlock_writer_wakeup_reader()
1023 WaitUntilThreadSleep(wakeup_arg.tid); in test_pthread_rwlock_writer_wakeup_reader()
1079 arg->tid = gettid(); in pthread_rwlock_wakeup_timeout_helper()
1108 wakeup_arg.tid = 0; in pthread_rwlock_timedrdlock_timeout_helper()
[all …]
Dstruct_layout_test.cpp36 CHECK_OFFSET(pthread_internal_t, tid, 16); in tests()
77 CHECK_OFFSET(pthread_internal_t, tid, 8); in tests()
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/netfilter/
Dxt_l2tp.h27 __u32 tid; member
/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

12