/bionic/libc/bionic/ |
H A D | pthread_detach.cpp | 35 pthread_internal_t* thread = __pthread_internal_find(t); local 36 if (thread == NULL) { 42 !atomic_compare_exchange_weak(&thread->join_state, &old_state, THREAD_DETACHED)) {
|
H A D | pthread_getcpuclockid.cpp | 34 pthread_internal_t* thread = __pthread_internal_find(t); local 35 if (thread == NULL) { 40 clockid_t result = ~static_cast<clockid_t>(thread->tid) << 3; 43 // Bit 2: thread (set) or process (clear)?
|
H A D | pthread_kill.cpp | 40 pthread_internal_t* thread = __pthread_internal_find(t); local 41 if (thread == NULL) { 45 return (tgkill(getpid(), thread->tid, sig) == -1) ? errno : 0;
|
H A D | pthread_getschedparam.cpp | 37 pthread_internal_t* thread = __pthread_internal_find(t); local 38 if (thread == NULL) { 42 int rc = sched_getparam(thread->tid, param); 46 *policy = sched_getscheduler(thread->tid);
|
H A D | pthread_join.cpp | 39 pthread_internal_t* thread = __pthread_internal_find(t); local 40 if (thread == NULL) { 46 !atomic_compare_exchange_weak(&thread->join_state, &old_state, THREAD_JOINED)) { 53 pid_t tid = thread->tid; 54 volatile int* tid_ptr = &thread->tid; 56 // We set thread->join_state to THREAD_JOINED with atomic operation, 57 // so no one is going to remove this thread except us. 59 // Wait for the thread to actually exit, if it hasn't already. 65 *return_value = thread->return_value; 68 __pthread_internal_remove_and_free(thread); [all...] |
H A D | pthread_setschedparam.cpp | 37 pthread_internal_t* thread = __pthread_internal_find(t); local 38 if (thread == NULL) { 42 int rc = sched_setscheduler(thread->tid, policy, param);
|
H A D | __cxa_thread_atexit_impl.cpp | 35 pthread_internal_t* thread = __get_thread(); local 36 dtor->next = thread->thread_local_dtors; 37 thread->thread_local_dtors = dtor; 42 pthread_internal_t* thread = __get_thread(); local 43 while (thread->thread_local_dtors != nullptr) { 44 thread_local_dtor* current = thread->thread_local_dtors; 45 thread->thread_local_dtors = current->next;
|
H A D | pthread_internal.cpp | 44 pthread_t __pthread_internal_add(pthread_internal_t* thread) { argument 48 thread->next = g_thread_list; 49 thread->prev = NULL; 50 if (thread->next != NULL) { 51 thread->next->prev = thread; 53 g_thread_list = thread; 54 return reinterpret_cast<pthread_t>(thread); 57 void __pthread_internal_remove(pthread_internal_t* thread) { argument 60 if (thread 70 __pthread_internal_free(pthread_internal_t* thread) argument 77 __pthread_internal_remove_and_free(pthread_internal_t* thread) argument 83 pthread_internal_t* thread = reinterpret_cast<pthread_internal_t*>(thread_id); local [all...] |
H A D | pthread_exit.cpp | 43 * and thread cancelation 47 pthread_internal_t* thread = __get_thread(); local 50 c->__cleanup_prev = thread->cleanup_stack; 51 thread->cleanup_stack = c; 55 pthread_internal_t* thread = __get_thread(); local 56 thread->cleanup_stack = c->__cleanup_prev; 66 pthread_internal_t* thread = __get_thread(); local 67 thread->return_value = return_value; 70 while (thread->cleanup_stack) { 71 __pthread_cleanup_t* c = thread [all...] |
H A D | pthread_setname_np.cpp | 59 // We have to change another thread's name. 60 pthread_internal_t* thread = __pthread_internal_find(t); local 61 if (thread == NULL) { 64 pid_t tid = thread->tid;
|
H A D | pthread_attr.cpp | 160 // Ask the kernel where our main thread's stack started. 200 pthread_internal_t* thread = reinterpret_cast<pthread_internal_t*>(t); local 201 *attr = thread->attr; 202 // We prefer reading join_state here to setting thread->attr.flags in pthread_detach. 204 if (atomic_load(&thread->join_state) == THREAD_DETACHED) { 207 // The main thread's stack information is not stored in thread->attr, and we need to 209 if (thread->tid == getpid()) {
|
H A D | pthread_create.cpp | 54 // This code is used both by each new pthread and the code that initializes the main thread. 55 void __init_tls(pthread_internal_t* thread) { argument 57 thread->tls[TLS_SLOT_SELF] = thread->tls; 58 thread->tls[TLS_SLOT_THREAD_ID] = thread; 60 thread->tls[TLS_SLOT_STACK_GUARD] = reinterpret_cast<void*>(__stack_chk_guard); 63 void __init_alternate_signal_stack(pthread_internal_t* thread) { argument 78 thread->alternate_signal_stack = stack_base; 82 prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, ss.ss_sp, ss.ss_size, "thread signa 87 __init_thread(pthread_internal_t* thread) argument 170 pthread_internal_t* thread = reinterpret_cast<pthread_internal_t*>(stack_top); local 188 pthread_internal_t* thread = reinterpret_cast<pthread_internal_t*>(arg); local 226 pthread_internal_t* thread = NULL; local [all...] |
/bionic/tests/ |
H A D | stdio_ext_test.cpp | 155 pthread_t thread; local 157 ASSERT_EQ(0, pthread_create(&thread, nullptr, 162 ASSERT_EQ(0, pthread_join(thread, nullptr));
|
H A D | semaphore_test.cpp | 195 pthread_t thread; local 196 ASSERT_EQ(0, pthread_create(&thread, nullptr, SemWaitEINTRThreadFn, &s)); 197 // Give some time for the thread to run sem_wait. 199 ASSERT_EQ(0, pthread_kill(thread, SIGUSR1)); 200 // Give some time for the thread to handle signal. 204 ASSERT_EQ(0, pthread_join(thread, &result)); 218 pthread_t thread; local 219 ASSERT_EQ(0, pthread_create(&thread, nullptr, SemWaitEINTRThreadFn, &s)); 220 // Give some time for the thread to run sem_wait. 222 ASSERT_EQ(0, pthread_kill(thread, SIGUSR [all...] |
H A D | pty_test.cpp | 126 // 2. Make master thread and slave thread running on different cpus: 127 // master thread uses first available cpu, and slave thread uses other cpus. 138 // 3. Create thread for slave reader. 139 pthread_t thread; local 143 ASSERT_EQ(0, pthread_create(&thread, nullptr, 158 ASSERT_EQ(0, pthread_join(thread, nullptr));
|
H A D | sys_socket_test.cpp | 79 pthread_t thread; local 80 ASSERT_EQ(0, pthread_create(&thread, NULL, ConnectFn, &connect_data)); 93 ASSERT_EQ(0, pthread_join(thread, &ret_val));
|
H A D | pthread_test.cpp | 139 // The surviving thread inherits all the forking thread's TLS values... 220 // because it is always set to false after each test. Each thread 244 // Can we create a thread? 282 // If thread 2 is already waiting to join thread 1... 320 // Wait for the thread to be running... 332 // Let the main thread know we're running. 335 // And wait for the main thread to exit. 381 // Spawn a thread tha 757 pthread_t thread; local 793 pthread_t thread; local 853 pthread_t thread; local 874 pthread_t thread; local 908 CreateWriterThread(pthread_t& thread, std::atomic<pid_t>& tid) argument 915 CreateReaderThread(pthread_t& thread, std::atomic<pid_t>& tid) argument 1128 pthread_t thread; member in class:pthread_CondWakeupTest 1622 pthread_t thread; local 1891 pthread_t thread; local [all...] |
/bionic/benchmarks/ |
H A D | pthread_benchmark.cpp | 130 pthread_t thread; local 131 pthread_create(&thread, NULL, IdleThread, NULL); 133 pthread_join(thread, NULL); 147 pthread_t thread; local 148 pthread_create(&thread, NULL, RunThread, &state); 149 pthread_join(thread, NULL); 164 pthread_t thread; local 165 pthread_create(&thread, NULL, ExitThread, &state); 166 pthread_join(thread, NULL);
|