/system/bt/osi/src/ |
D | thread.c | 49 thread_t *thread; member 85 start.thread = ret; in thread_new_sized() 109 void thread_free(thread_t *thread) { in thread_free() argument 110 if (!thread) in thread_free() 113 thread_stop(thread); in thread_free() 114 thread_join(thread); in thread_free() 116 fixed_queue_free(thread->work_queue, osi_free); in thread_free() 117 reactor_free(thread->reactor); in thread_free() 118 osi_free(thread); in thread_free() 121 void thread_join(thread_t *thread) { in thread_join() argument [all …]
|
/system/bt/osi/test/ |
D | thread_test.cpp | 16 thread_t *thread = thread_new("test_thread"); in TEST_F() local 17 ASSERT_TRUE(thread != NULL); in TEST_F() 18 thread_free(thread); in TEST_F() 22 thread_t *thread = thread_new("test_thread"); in TEST_F() local 23 thread_free(thread); in TEST_F() 27 thread_t *thread = thread_new("test_name"); in TEST_F() local 28 ASSERT_STREQ(thread_name(thread), "test_name"); in TEST_F() 29 thread_free(thread); in TEST_F() 33 thread_t *thread = thread_new("0123456789abcdef"); in TEST_F() local 34 ASSERT_STREQ("0123456789abcdef", thread_name(thread)); in TEST_F() [all …]
|
D | semaphore_test.cpp | 75 thread_t *thread = thread_new("semaphore_test_thread"); in TEST_F() local 76 ASSERT_TRUE(thread != NULL); in TEST_F() 80 thread_post(thread, sleep_then_increment_counter, &sequence_helper); in TEST_F() 86 thread_free(thread); in TEST_F()
|
D | alarm_test.cpp | 307 thread_t *thread = thread_new("timers.test_callback_ordering_on_queue.thread"); in TEST_F() local 309 alarm_register_processing_queue(queue, thread); in TEST_F() 336 thread_free(thread); in TEST_F() 344 thread_t *thread = in TEST_F() local 347 alarm_register_processing_queue(queue, thread); in TEST_F() 394 thread_free(thread); in TEST_F() 402 thread_t *thread = in TEST_F() local 405 alarm_register_processing_queue(queue, thread); in TEST_F() 452 thread_free(thread); in TEST_F()
|
/system/extras/memory_replay/tests/ |
D | ThreadTest.cpp | 30 Thread thread; in TEST() local 33 thread.WaitForReady(); in TEST() 38 Thread* thread = thread_data->first; in ThreadWaitForReady() local 41 thread->WaitForReady(); in ThreadWaitForReady() 48 Thread thread; in TEST() local 50 thread_data_t thread_data = std::make_pair(&thread, &finish); in TEST() 52 thread.SetPending(); in TEST() 61 thread.ClearPending(); in TEST() 68 Thread* thread = thread_data->first; in ThreadWaitForPending() local 71 thread->WaitForPending(); in ThreadWaitForPending() [all …]
|
D | ThreadsTest.cpp | 28 Thread* thread = threads.CreateThread(900); in TEST() local 29 ASSERT_TRUE(thread != nullptr); in TEST() 33 ASSERT_EQ(thread, found_thread); in TEST() 35 thread->CreateAction(0x1234, "thread_done", ""); in TEST() 37 thread->SetPending(); in TEST() 39 threads.Finish(thread); in TEST() 90 Thread* thread = threads.CreateThread(900); in TEST() local 91 ASSERT_TRUE(thread != nullptr); in TEST() 97 thread->CreateAction(0x1234 + i, "malloc", "100"); in TEST() 98 thread->SetPending(); in TEST() [all …]
|
/system/extras/memory_replay/ |
D | Threads.cpp | 34 Thread* thread = reinterpret_cast<Thread*>(data); in ThreadRunner() local 36 thread->WaitForPending(); in ThreadRunner() 37 Action* action = thread->GetAction(); in ThreadRunner() 38 thread->AddTimeNsecs(action->Execute(thread->pointers())); in ThreadRunner() 40 thread->ClearPending(); in ThreadRunner() 80 Thread* thread = FindEmptyEntry(tid); in CreateThread() local 81 if (thread == nullptr) { in CreateThread() 85 thread->tid_ = tid; in CreateThread() 86 thread->pointers_ = pointers_; in CreateThread() 87 thread->total_time_nsecs_ = 0; in CreateThread() [all …]
|
D | main.cpp | 103 Thread* thread = threads.FindThread(tid); in ProcessDump() local 104 if (thread == nullptr) { in ProcessDump() 105 thread = threads.CreateThread(tid); in ProcessDump() 110 thread->WaitForReady(); in ProcessDump() 112 Action* action = thread->CreateAction(key_pointer, type, line + line_pos); in ProcessDump() 126 thread->SetPending(); in ProcessDump() 130 threads.Finish(thread); in ProcessDump() 137 thread->WaitForReady(); in ProcessDump()
|
/system/bt/osi/include/ |
D | thread.h | 43 void thread_free(thread_t *thread); 48 void thread_join(thread_t *thread); 55 bool thread_post(thread_t *thread, thread_fn func, void *context); 60 void thread_stop(thread_t *thread); 65 bool thread_set_priority(thread_t *thread, int priority); 69 bool thread_is_self(const thread_t *thread); 72 reactor_t *thread_get_reactor(const thread_t *thread); 75 const char *thread_name(const thread_t *thread);
|
/system/bt/btif/src/ |
D | btif_sock.c | 43 static thread_t *thread; variable 58 assert(thread == NULL); in btif_sock_init() 79 thread = thread_new("btif_sock"); in btif_sock_init() 80 if (!thread) { in btif_sock_init() 86 status = btsock_sco_init(thread); in btif_sock_init() 96 thread_free(thread); in btif_sock_init() 97 thread = NULL; in btif_sock_init() 109 thread_stop(thread); in btif_sock_cleanup() 110 thread_join(thread); in btif_sock_cleanup() 115 thread_free(thread); in btif_sock_cleanup() [all …]
|
/system/extras/simpleperf/ |
D | sample_tree.cpp | 35 const ThreadEntry* thread = thread_tree_->FindThreadOrNew(pid, tid); in AddSample() local 36 const MapEntry* map = thread_tree_->FindMap(thread, ip, in_kernel); in AddSample() 39 SampleEntry value(ip, time, period, 0, 1, thread, map, symbol); in AddSample() 49 const ThreadEntry* thread = thread_tree_->FindThreadOrNew(pid, tid); in AddBranchSample() local 50 const MapEntry* from_map = thread_tree_->FindMap(thread, from_ip, false); in AddBranchSample() 52 from_map = thread_tree_->FindMap(thread, from_ip, true); in AddBranchSample() 55 const MapEntry* to_map = thread_tree_->FindMap(thread, to_ip, false); in AddBranchSample() 57 to_map = thread_tree_->FindMap(thread, to_ip, true); in AddBranchSample() 61 SampleEntry value(to_ip, time, period, 0, 1, thread, to_map, to_symbol); in AddBranchSample() 76 const ThreadEntry* thread = thread_tree_->FindThreadOrNew(pid, tid); in AddCallChainSample() local [all …]
|
D | sample_tree_test.cpp | 33 ASSERT_TRUE(sample.thread != nullptr); in SampleMatchExpectation() 34 ASSERT_EQ(expected.pid, sample.thread->pid); in SampleMatchExpectation() 35 ASSERT_EQ(expected.tid, sample.thread->tid); in SampleMatchExpectation() 54 if (sample1.thread->pid != sample2.thread->pid) { in CompareSampleFunction() 55 return sample1.thread->pid - sample2.thread->pid; in CompareSampleFunction() 57 if (sample1.thread->tid != sample2.thread->tid) { in CompareSampleFunction() 58 return sample1.thread->tid - sample2.thread->tid; in CompareSampleFunction()
|
D | cmd_record.cpp | 566 for (auto& thread : thread_comms) { in DumpThreadCommAndMmaps() local 567 if (dump_threads.find(thread.tid) != dump_threads.end()) { in DumpThreadCommAndMmaps() 568 dump_processes.insert(thread.pid); in DumpThreadCommAndMmaps() 576 for (auto& thread : thread_comms) { in DumpThreadCommAndMmaps() local 577 if (thread.pid != thread.tid) { in DumpThreadCommAndMmaps() 580 if (!all_threads && dump_processes.find(thread.pid) == dump_processes.end()) { in DumpThreadCommAndMmaps() 583 CommRecord record = CreateCommRecord(*attr, thread.pid, thread.tid, thread.comm); in DumpThreadCommAndMmaps() 588 if (!GetThreadMmapsInProcess(thread.pid, &thread_mmaps)) { in DumpThreadCommAndMmaps() 597 CreateMmapRecord(*attr, false, thread.pid, thread.tid, thread_mmap.start_addr, in DumpThreadCommAndMmaps() 606 for (auto& thread : thread_comms) { in DumpThreadCommAndMmaps() local [all …]
|
D | environment.cpp | 303 ThreadComm thread; in GetThreadComm() local 304 thread.tid = tid; in GetThreadComm() 305 thread.pid = pid; in GetThreadComm() 306 thread.comm = comm; in GetThreadComm() 307 thread_comms->push_back(thread); in GetThreadComm() 351 ThreadMmap thread; in GetThreadMmapsInProcess() local 352 thread.start_addr = start_addr; in GetThreadMmapsInProcess() 353 thread.len = end_addr - start_addr; in GetThreadMmapsInProcess() 354 thread.pgoff = pgoff; in GetThreadMmapsInProcess() 355 thread.name = execname; in GetThreadMmapsInProcess() [all …]
|
D | sample_tree.h | 47 const ThreadEntry* thread; member 55 uint64_t sample_count, const ThreadEntry* thread, const MapEntry* map, in SampleEntry() 62 thread(thread), in SampleEntry() 63 thread_comm(thread->comm), in SampleEntry()
|
/system/extras/tests/net_test/ |
D | tcp_nuke_addr_test.py | 51 def RunInBackground(thread): argument 58 thread.start() 59 yield thread 61 thread.join() 176 def CheckThreadException(thread): argument 177 thread.join(100) 178 self.assertFalse(thread.is_alive()) 179 self.assertIsNotNone(thread.exception) 180 self.assertTrue(isinstance(thread.exception, IOError)) 181 self.assertEquals(errno.ETIMEDOUT, thread.exception.errno) [all …]
|
/system/core/adb/ |
D | socket_test.cpp | 87 adb_thread_t thread; in TEST_F() local 88 ASSERT_TRUE(adb_thread_create(FdEventThreadFunc, nullptr, &thread)); in TEST_F() 103 TerminateThread(thread); in TEST_F() 150 adb_thread_t thread; in TEST_F() local 152 &arg, &thread)); in TEST_F() 160 TerminateThread(thread); in TEST_F() 174 adb_thread_t thread; in TEST_F() local 176 &arg, &thread)); in TEST_F() 189 TerminateThread(thread); in TEST_F() 206 adb_thread_t thread; in TEST_F() local [all …]
|
D | fdevent_test.cpp | 80 adb_thread_t thread; in TEST_F() local 82 ASSERT_TRUE(adb_thread_create([](void*) { fdevent_loop(); }, nullptr, &thread)); in TEST_F() 83 TerminateThread(thread); in TEST_F() 115 adb_thread_t thread; in TEST_F() local 125 &thread)); in TEST_F() 135 TerminateThread(thread); in TEST_F() 174 adb_thread_t thread; in TEST_F() local 175 ASSERT_TRUE(adb_thread_create(InvalidFdThreadFunc, nullptr, &thread)); in TEST_F() 176 ASSERT_TRUE(adb_thread_join(thread)); in TEST_F()
|
D | sysdeps.h | 138 adb_thread_t* thread = nullptr) { 142 if (thread) { 143 *thread = reinterpret_cast<HANDLE>(handle); 145 CloseHandle(thread); 152 static __inline__ bool adb_thread_join(adb_thread_t thread) { in adb_thread_join() argument 153 switch (WaitForSingleObject(thread, INFINITE)) { in adb_thread_join() 155 CloseHandle(thread); in adb_thread_join() 170 static __inline__ bool adb_thread_detach(adb_thread_t thread) { in adb_thread_detach() argument 171 CloseHandle(thread); in adb_thread_detach() 705 adb_thread_t* thread = nullptr) { [all …]
|
/system/bt/hci/test/ |
D | low_power_manager_test.cpp | 41 static thread_t *thread; variable 67 thread_post(thread, flush_work_queue_item, NULL); 74 thread_post(thread, flush_work_queue_item, NULL); 109 thread = thread_new("test_thread"); 113 manager->init(thread); 123 thread_free(thread);
|
/system/bt/hci/src/ |
D | hci_inject.c | 56 static thread_t *thread; variable 70 assert(thread == NULL); in hci_inject_open() 76 thread = thread_new("hci_inject"); in hci_inject_open() 77 if (!thread) in hci_inject_open() 91 socket_register(listen_socket, thread_get_reactor(thread), NULL, accept_ready, NULL); in hci_inject_open() 106 thread_free(thread); in hci_inject_close() 109 thread = NULL; in hci_inject_close() 145 socket_register(socket, thread_get_reactor(thread), client, read_ready, NULL); in accept_ready()
|
D | hci_layer.c | 123 static thread_t *thread; // We own this variable 222 thread = thread_new("hci_thread"); in start_up() 223 if (!thread) { in start_up() 243 …fixed_queue_register_dequeue(command_queue, thread_get_reactor(thread), event_command_ready, NULL); in start_up() 244 fixed_queue_register_dequeue(packet_queue, thread_get_reactor(thread), event_packet_ready, NULL); in start_up() 247 hal->init(&hal_callbacks, thread); in start_up() 248 low_power_manager->init(thread); in start_up() 275 thread_post(thread, event_finish_startup, NULL); in start_up() 288 if (thread) { in shut_down() 291 thread_post(thread, event_epilog, NULL); in shut_down() [all …]
|
/system/extras/simpleperf/runtest/ |
D | function_pthread.cpp | 20 pthread_t thread; in main() local 21 int ret = pthread_create(&thread, nullptr, ChildThreadFunction, nullptr); in main() 27 ret = pthread_join(thread, nullptr); in main()
|
/system/extras/libfec/ |
D | fec_process.cpp | 98 pthread_t thread; in process() local 100 if (pthread_create(&thread, NULL, __process, &info[i]) != 0) { in process() 104 handles.push_back(thread); in process() 117 for (auto thread : handles) { in process() local 120 if (pthread_join(thread, (void **)&p) != 0) { in process()
|
/system/extras/tests/tcp_nuke_addr/ |
D | tcp_nuke_addr_test.cpp | 141 std::thread t0(killSockets, sin, KILL_INTERVAL_MS, &lock); in main() 142 std::thread *connectThreads[CONNECT_THREADS]; in main() 144 connectThreads[i] = new std::thread(connectLoop, sin, listensock, &lock, &attempts); in main() 146 std::thread t1(progressThread, &attempts); in main()
|