/bionic/libc/bionic/ |
D | pthread_internal.cpp | 44 pthread_t __pthread_internal_add(pthread_internal_t* thread) { in __pthread_internal_add() argument 48 thread->next = g_thread_list; in __pthread_internal_add() 49 thread->prev = NULL; in __pthread_internal_add() 50 if (thread->next != NULL) { in __pthread_internal_add() 51 thread->next->prev = thread; in __pthread_internal_add() 53 g_thread_list = thread; in __pthread_internal_add() 54 return reinterpret_cast<pthread_t>(thread); in __pthread_internal_add() 57 void __pthread_internal_remove(pthread_internal_t* thread) { in __pthread_internal_remove() argument 60 if (thread->next != NULL) { in __pthread_internal_remove() 61 thread->next->prev = thread->prev; in __pthread_internal_remove() [all …]
|
D | pthread_create.cpp | 55 void __init_tls(pthread_internal_t* thread) { in __init_tls() argument 56 if (thread->mmap_size == 0) { in __init_tls() 59 memset(thread->tls, 0, sizeof(thread->tls)); in __init_tls() 60 memset(thread->key_data, 0, sizeof(thread->key_data)); in __init_tls() 64 thread->tls[TLS_SLOT_SELF] = thread->tls; in __init_tls() 65 thread->tls[TLS_SLOT_THREAD_ID] = thread; in __init_tls() 67 thread->tls[TLS_SLOT_STACK_GUARD] = reinterpret_cast<void*>(__stack_chk_guard); in __init_tls() 70 void __init_alternate_signal_stack(pthread_internal_t* thread) { in __init_alternate_signal_stack() argument 85 thread->alternate_signal_stack = stack_base; in __init_alternate_signal_stack() 93 int __init_thread(pthread_internal_t* thread) { in __init_thread() argument [all …]
|
D | pthread_exit.cpp | 47 pthread_internal_t* thread = __get_thread(); in __pthread_cleanup_push() local 50 c->__cleanup_prev = thread->cleanup_stack; in __pthread_cleanup_push() 51 thread->cleanup_stack = c; in __pthread_cleanup_push() 55 pthread_internal_t* thread = __get_thread(); in __pthread_cleanup_pop() local 56 thread->cleanup_stack = c->__cleanup_prev; in __pthread_cleanup_pop() 66 pthread_internal_t* thread = __get_thread(); in pthread_exit() local 67 thread->return_value = return_value; in pthread_exit() 70 while (thread->cleanup_stack) { in pthread_exit() 71 __pthread_cleanup_t* c = thread->cleanup_stack; in pthread_exit() 72 thread->cleanup_stack = c->__cleanup_prev; in pthread_exit() [all …]
|
D | pthread_join.cpp | 39 pthread_internal_t* thread = __pthread_internal_find(t); in pthread_join() local 40 if (thread == NULL) { in pthread_join() 46 !atomic_compare_exchange_weak(&thread->join_state, &old_state, THREAD_JOINED)) { in pthread_join() 53 pid_t tid = thread->tid; in pthread_join() 54 volatile int* tid_ptr = &thread->tid; in pthread_join() 65 *return_value = thread->return_value; in pthread_join() 68 __pthread_internal_remove_and_free(thread); in pthread_join()
|
D | pthread_getschedparam.cpp | 37 pthread_internal_t* thread = __pthread_internal_find(t); in pthread_getschedparam() local 38 if (thread == NULL) { in pthread_getschedparam() 42 int rc = sched_getparam(thread->tid, param); in pthread_getschedparam() 46 *policy = sched_getscheduler(thread->tid); in pthread_getschedparam()
|
D | pthread_getcpuclockid.cpp | 34 pthread_internal_t* thread = __pthread_internal_find(t); in pthread_getcpuclockid() local 35 if (thread == NULL) { in pthread_getcpuclockid() 40 clockid_t result = ~static_cast<clockid_t>(thread->tid) << 3; in pthread_getcpuclockid()
|
D | pthread_kill.cpp | 40 pthread_internal_t* thread = __pthread_internal_find(t); in pthread_kill() local 41 if (thread == NULL) { in pthread_kill() 45 return (tgkill(getpid(), thread->tid, sig) == -1) ? errno : 0; in pthread_kill()
|
D | pthread_setschedparam.cpp | 37 pthread_internal_t* thread = __pthread_internal_find(t); in pthread_setschedparam() local 38 if (thread == NULL) { in pthread_setschedparam() 42 int rc = sched_setscheduler(thread->tid, policy, param); in pthread_setschedparam()
|
D | pthread_detach.cpp | 35 pthread_internal_t* thread = __pthread_internal_find(t); in pthread_detach() local 36 if (thread == NULL) { in pthread_detach() 42 !atomic_compare_exchange_weak(&thread->join_state, &old_state, THREAD_DETACHED)) { in pthread_detach()
|
D | pthread_internal.h | 108 __LIBC_HIDDEN__ int __init_thread(pthread_internal_t* thread); 109 __LIBC_HIDDEN__ void __init_tls(pthread_internal_t* thread); 112 __LIBC_HIDDEN__ pthread_t __pthread_internal_add(pthread_internal_t* thread); 114 __LIBC_HIDDEN__ void __pthread_internal_remove(pthread_internal_t* thread); 115 __LIBC_HIDDEN__ void __pthread_internal_remove_and_free(pthread_internal_t* thread);
|
D | pthread_setname_np.cpp | 60 pthread_internal_t* thread = __pthread_internal_find(t); in pthread_setname_np() local 61 if (thread == NULL) { in pthread_setname_np() 64 pid_t tid = thread->tid; in pthread_setname_np()
|
D | pthread_attr.cpp | 171 pthread_internal_t* thread = reinterpret_cast<pthread_internal_t*>(t); in pthread_getattr_np() local 172 *attr = thread->attr; in pthread_getattr_np() 175 if (atomic_load(&thread->join_state) == THREAD_DETACHED) { in pthread_getattr_np() 180 if (thread->tid == getpid()) { in pthread_getattr_np()
|
/bionic/benchmarks/ |
D | pthread_benchmark.cpp | 163 pthread_t thread; in Run() local 167 pthread_create(&thread, NULL, IdleThread, NULL); in Run() 169 pthread_join(thread, NULL); in Run() 182 pthread_t thread; in Run() local 186 pthread_create(&thread, NULL, RunThread, this); in Run() 187 pthread_join(thread, NULL); in Run() 200 pthread_t thread; in Run() local 203 pthread_create(&thread, NULL, ExitThread, this); in Run() 204 pthread_join(thread, NULL); in Run()
|
/bionic/libm/i387/ |
D | npx.h | 151 void npxexit(struct thread *td); 153 int npxgetregs(struct thread *td, union savefpu *addr); 156 void npxsetregs(struct thread *td, union savefpu *addr);
|
/bionic/tests/ |
D | sys_socket_test.cpp | 79 pthread_t thread; in RunTest() local 80 ASSERT_EQ(0, pthread_create(&thread, NULL, ConnectFn, &connect_data)); in RunTest() 93 ASSERT_EQ(0, pthread_join(thread, &ret_val)); in RunTest()
|
D | pthread_test.cpp | 771 pthread_t thread; in TEST() local 772 ASSERT_EQ(0, pthread_create(&thread, NULL, in TEST() 780 ASSERT_EQ(0, pthread_join(thread, NULL)); in TEST() 805 pthread_t thread; in TEST() local 806 ASSERT_EQ(0, pthread_create(&thread, NULL, in TEST() 814 ASSERT_EQ(0, pthread_join(thread, NULL)); in TEST() 841 void CreateWriterThread(pthread_t& thread, std::atomic<pid_t>& tid) { in CreateWriterThread() argument 844 ASSERT_EQ(0, pthread_create(&thread, NULL, in CreateWriterThread() 848 void CreateReaderThread(pthread_t& thread, std::atomic<pid_t>& tid) { in CreateReaderThread() argument 851 ASSERT_EQ(0, pthread_create(&thread, NULL, in CreateReaderThread() [all …]
|
/bionic/ |
D | README.md | 26 thread-safe static initialization and the like, so it just calls functions that
|