Home
last modified time | relevance | path

Searched refs:thread (Results 1 – 25 of 140) sorted by relevance

123456

/system/bt/osi/src/
Dthread.cc52 thread_t* thread; member
85 start.thread = ret; in thread_new_sized()
108 void thread_free(thread_t* thread) { in thread_free() argument
109 if (!thread) return; in thread_free()
111 thread_stop(thread); in thread_free()
112 thread_join(thread); in thread_free()
114 fixed_queue_free(thread->work_queue, osi_free); in thread_free()
115 reactor_free(thread->reactor); in thread_free()
116 osi_free(thread); in thread_free()
119 void thread_join(thread_t* thread) { in thread_join() argument
[all …]
/system/bt/osi/test/
Dthread_test.cc14 thread_t* thread = thread_new("test_thread"); in TEST_F() local
15 ASSERT_TRUE(thread != NULL); in TEST_F()
16 thread_free(thread); in TEST_F()
20 thread_t* thread = thread_new("test_thread"); in TEST_F() local
21 thread_free(thread); in TEST_F()
25 thread_t* thread = thread_new("test_name"); in TEST_F() local
26 ASSERT_STREQ(thread_name(thread), "test_name"); in TEST_F()
27 thread_free(thread); in TEST_F()
31 thread_t* thread = thread_new("0123456789abcdef"); in TEST_F() local
32 ASSERT_STREQ("0123456789abcdef", thread_name(thread)); in TEST_F()
[all …]
Dsemaphore_test.cc74 thread_t* thread = thread_new("semaphore_test_thread"); in TEST_F() local
75 ASSERT_TRUE(thread != NULL); in TEST_F()
79 thread_post(thread, sleep_then_increment_counter, &sequence_helper); in TEST_F()
85 thread_free(thread); in TEST_F()
/system/extras/memory_replay/tests/
DThreadTest.cpp30 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 …]
DThreadsTest.cpp28 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/bt/osi/include/
Dthread.h44 void thread_free(thread_t* thread);
49 void thread_join(thread_t* thread);
56 bool thread_post(thread_t* thread, thread_fn func, void* context);
61 void thread_stop(thread_t* thread);
66 bool thread_set_priority(thread_t* thread, int priority);
73 bool thread_set_rt_priority(thread_t* thread, int priority);
78 bool thread_is_self(const thread_t* thread);
81 reactor_t* thread_get_reactor(const thread_t* thread);
84 const char* thread_name(const thread_t* thread);
/system/extras/memory_replay/
DThreads.cpp34 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 …]
Dmain.cpp103 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/extras/simpleperf/
DIOEventLoop_test.cpp48 std::thread thread([&]() { in TEST() local
56 thread.join(); in TEST()
82 std::thread thread([&]() { in TEST() local
95 thread.join(); in TEST()
110 std::thread thread([&]() { in TEST() local
118 thread.join(); in TEST()
158 std::thread thread([&]() { in TEST() local
166 thread.join(); in TEST()
Dcmd_report_sample.cpp91 bool GetCallEntry(const ThreadEntry* thread, bool in_kernel, uint64_t ip, bool omit_unknown_dso,
93 bool GetCallEntry(const ThreadEntry* thread, bool in_kernel, uint64_t ip, bool omit_unknown_dso,
322 auto& thread = proto_record.thread(); in DumpProtobufReport() local
324 FprintIndented(report_fp_, 1, "thread_id: %u\n", thread.thread_id()); in DumpProtobufReport()
325 FprintIndented(report_fp_, 1, "process_id: %u\n", thread.process_id()); in DumpProtobufReport()
326 FprintIndented(report_fp_, 1, "thread_name: %s\n", thread.thread_name().c_str()); in DumpProtobufReport()
374 const ThreadEntry* thread = in PrintSampleRecordInProtobuf() local
376 bool ret = GetCallEntry(thread, in_kernel, r.ip_data.ip, false, &vaddr_in_file, &file_id, in PrintSampleRecordInProtobuf()
408 if (!GetCallEntry(thread, in_kernel, ip, true, &vaddr_in_file, &file_id, &symbol_id)) { in PrintSampleRecordInProtobuf()
430 bool ReportSampleCommand::GetCallEntry(const ThreadEntry* thread, in GetCallEntry() argument
[all …]
Dthread_tree.cpp49 ThreadEntry* thread = FindThreadOrNew(pid, tid); in SetThreadName() local
50 if (comm != thread->comm) { in SetThreadName()
53 thread->comm = thread_comm_storage_.back()->c_str(); in SetThreadName()
92 ThreadEntry* thread = new ThreadEntry{ in CreateThread() local
97 auto pair = thread_tree_.insert(std::make_pair(tid, std::unique_ptr<ThreadEntry>(thread))); in CreateThread()
99 return thread; in CreateThread()
132 ThreadEntry* thread = FindThreadOrNew(pid, tid); in AddThreadMap() local
136 FixOverlappedMap(thread->maps, map); in AddThreadMap()
137 auto pair = thread->maps->insert(map); in AddThreadMap()
202 const MapEntry* ThreadTree::FindMap(const ThreadEntry* thread, uint64_t ip, in FindMap() argument
[all …]
Dcmd_stat_test.cpp160 std::thread thread([]() { in TEST() local
164 thread.detach(); in TEST()
170 std::thread thread([&]() { in TEST() local
174 thread.detach(); in TEST()
Dcmd_report.cpp67 const ThreadEntry* thread; member
77 uint64_t sample_count, const ThreadEntry* thread, in SampleEntry()
83 thread(thread), in SampleEntry()
84 thread_comm(thread->comm), in SampleEntry()
144 const ThreadEntry* thread = in CreateSample() local
147 thread_tree_->FindMap(thread, r.ip_data.ip, in_kernel); in CreateSample()
153 new SampleEntry(r.time_data.time, r.period_data.period, 0, 1, thread, in CreateSample()
159 const ThreadEntry* thread = in CreateBranchSample() local
161 const MapEntry* from_map = thread_tree_->FindMap(thread, item.from); in CreateBranchSample()
165 const MapEntry* to_map = thread_tree_->FindMap(thread, item.to); in CreateBranchSample()
[all …]
/system/bt/test/suite/core/
Dthread_performance_test.cc18 thread_t* thread; variable
56 thread = thread_new("performance test thread"); in SetUp()
57 thread_post(thread, run_message_loop, nullptr); in SetUp()
64 thread_free(thread); in TearDown()
65 thread = nullptr; in TearDown()
102 thread = thread_new("queue performance test thread"); in TEST_F()
104 fixed_queue_register_dequeue(bt_msg_queue, thread_get_reactor(thread), in TEST_F()
128 thread_free(thread); in TEST_F()
129 thread = nullptr; in TEST_F()
/system/core/adb/
Dfdevent_test.cpp83 std::thread thread(fdevent_loop); in TEST_F() local
84 TerminateThread(thread); in TEST_F()
124 std::thread thread(FdEventThreadFunc, &thread_arg); in TEST_F() local
134 TerminateThread(thread); in TEST_F()
173 std::thread thread(InvalidFdThreadFunc); in TEST_F() local
174 thread.join(); in TEST_F()
181 std::thread thread(fdevent_loop); in TEST_F() local
190 TerminateThread(thread); in TEST_F()
Dsocket_test.cpp87 std::thread thread(fdevent_loop); in TEST_F() local
103 TerminateThread(thread); in TEST_F()
150 std::thread thread(CloseWithPacketThreadFunc, &arg); in TEST_F() local
159 TerminateThread(thread); in TEST_F()
173 std::thread thread(CloseWithPacketThreadFunc, &arg); in TEST_F() local
188 TerminateThread(thread); in TEST_F()
205 std::thread thread(CloseWithPacketThreadFunc, &arg); in TEST_F() local
213 TerminateThread(thread); in TEST_F()
243 std::thread client_thread(ClientThreadFunc); in TEST_F()
251 std::thread thread(CloseRdHupSocketThreadFunc, &arg); in TEST_F() local
[all …]
Dfdevent_test.h64 void TerminateThread(std::thread& thread) { in TerminateThread() argument
67 thread.join(); in TerminateThread()
/system/bt/btif/src/
Dbtif_sock.cc49 static thread_t* thread; variable
60 CHECK(thread == NULL); in btif_sock_init()
84 thread = thread_new("btif_sock"); in btif_sock_init()
85 if (!thread) { in btif_sock_init()
91 status = btsock_sco_init(thread); in btif_sock_init()
102 thread_free(thread); in btif_sock_init()
103 thread = NULL; in btif_sock_init()
118 thread_free(thread); in btif_sock_cleanup()
119 thread = NULL; in btif_sock_cleanup()
/system/core/base/
Dproperties_test.cpp130 std::thread thread([&]() { in TEST() local
140 thread.join(); in TEST()
156 std::thread thread([&]() { in TEST() local
167 thread.join(); in TEST()
172 std::thread thread([&]() { in TEST() local
183 thread.join(); in TEST()
187 std::thread thread([&]() { in TEST() local
194 thread.join(); in TEST()
/system/bt/hci/src/
Dhci_inject.cc64 static thread_t* thread; variable
73 CHECK(thread == NULL); in hci_inject_open()
79 thread = thread_new("hci_inject"); in hci_inject_open()
80 if (!thread) goto error; in hci_inject_open()
90 socket_register(listen_socket, thread_get_reactor(thread), NULL, accept_ready, in hci_inject_open()
106 thread_free(thread); in hci_inject_close()
109 thread = NULL; in hci_inject_close()
144 socket_register(socket, thread_get_reactor(thread), client, read_ready, NULL); in accept_ready()
/system/extras/simpleperf/inferno/
Dinferno.py151 for _, thread in process.threads.items():
152 thread.collapse_flamegraph()
206 for thread in main_thread:
207 …f.write("<br/><br/><b>Main Thread %d (%d samples):</b><br/>\n\n\n\n" % (thread.tid, thread.num_sam…
208 renderSVG(thread.flamegraph, f, process.args.color, process.args.svg_width)
211 for thread in other_threads:
212 …f.write("<br/><br/><b>Thread %d (%d samples):</b><br/>\n\n\n\n" % (thread.tid, thread.num_samples))
213 renderSVG(thread.flamegraph, f, process.args.color, process.args.svg_width)
229 for _, thread in process.threads.items():
230 generate_flamegraph_offsets(thread.flamegraph)
/system/extras/simpleperf/runtest/
Dfunction_pthread.cpp21 pthread_t thread; in main() local
22 int ret = pthread_create(&thread, nullptr, ChildThreadFunction, nullptr); in main()
28 ret = pthread_join(thread, nullptr); in main()
/system/extras/libfec/
Dfec_process.cpp100 pthread_t thread; in process() local
102 if (pthread_create(&thread, NULL, __process, &info[i]) != 0) { in process()
106 handles.push_back(thread); in process()
119 for (auto thread : handles) { in process() local
122 if (pthread_join(thread, (void **)&p) != 0) { in process()
/system/core/init/
Dueventd_test.cpp51 std::vector<std::thread> threads; in WriteFromMultipleThreads()
57 threads.emplace_back(std::thread(make_thread_function(file, parameter))); in WriteFromMultipleThreads()
60 for (auto& thread : threads) { in WriteFromMultipleThreads() local
61 thread.join(); in WriteFromMultipleThreads()
/system/core/debuggerd/
Ddebuggerd.cpp42 static std::thread spawn_redirect_thread(unique_fd fd) { in spawn_redirect_thread()
43 return std::thread([fd{ std::move(fd) }]() { in spawn_redirect_thread()
92 std::thread redirect_thread = spawn_redirect_thread(std::move(piperead)); in main()

123456