Home
last modified time | relevance | path

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

1234567

/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()
168 std::thread thread([&]() { in TEST() local
176 thread.join(); in TEST()
/system/core/adb/
Dsocket_test.cpp87 std::thread thread(fdevent_loop); in TEST_F() local
103 TerminateThread(thread); in TEST_F()
146 std::thread thread(CloseWithPacketThreadFunc, &arg); in TEST_F() local
155 TerminateThread(thread); in TEST_F()
169 std::thread thread(CloseWithPacketThreadFunc, &arg); in TEST_F() local
184 TerminateThread(thread); in TEST_F()
201 std::thread thread(CloseWithPacketThreadFunc, &arg); in TEST_F() local
209 TerminateThread(thread); in TEST_F()
229 std::thread thread(fdevent_loop); in TEST_F() local
248 TerminateThread(thread); in TEST_F()
[all …]
Dfdevent_test.cpp84 std::thread thread(fdevent_loop); in TEST_F() local
85 TerminateThread(thread); in TEST_F()
125 std::thread thread(FdEventThreadFunc, &thread_arg); in TEST_F() local
135 TerminateThread(thread); in TEST_F()
174 std::thread thread(InvalidFdThreadFunc); in TEST_F() local
175 thread.join(); in TEST_F()
182 std::thread thread(fdevent_loop); in TEST_F() local
197 TerminateThread(thread); in TEST_F()
221 std::thread thread(fdevent_loop); in TEST_F() local
225 TerminateThread(thread); in TEST_F()
Dfdevent_test.h59 void TerminateThread(std::thread& thread) { in TerminateThread() argument
62 thread.join(); in TerminateThread()
/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/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/core/libunwindstack/tests/
DMapInfoGetLoadBiasTest.cpp96 std::vector<std::thread*> threads; in MultipleThreadTest()
103 std::thread* thread = new std::thread([i, this, &wait, &load_bias_values]() { in MultipleThreadTest() local
108 threads.push_back(thread); in MultipleThreadTest()
113 for (auto thread : threads) { in MultipleThreadTest() local
114 thread->join(); in MultipleThreadTest()
115 delete thread; in MultipleThreadTest()
DUnwindTest.cpp219 std::thread thread([&]() { in TEST_F() local
260 thread.join(); in TEST_F()
323 std::vector<std::thread*> threads; in TEST_F()
329 std::thread* thread = new std::thread([i, &frames, &maps, &process_memory, &wait]() { in TEST_F() local
340 threads.push_back(thread); in TEST_F()
343 for (auto thread : threads) { in TEST_F() local
344 thread->join(); in TEST_F()
345 delete thread; in TEST_F()
/system/extras/simpleperf/scripts/inferno/
Dinferno.py131 main_threads = [thread for thread in process.threads.values() if thread.tid == thread.pid]
136 for thread in process.threads.values():
137 min_event_count = thread.num_events * args.min_callchain_percentage * 0.01
138 thread.flamegraph.trim_callchain(min_event_count)
211 for thread in sorted(process.threads.values(), key=lambda x: x.num_events, reverse=True):
213 thread.tid, thread.name, thread.num_samples))
214 renderSVG(process, thread.flamegraph, f, args.color)
224 for thread in process.threads.values():
225 thread.flamegraph.generate_offset(0)
Ddata_types.py67 thread = self.threads.get(tid)
68 if thread is None:
69 thread = self.threads[tid] = Thread(tid, pid)
70 return thread
73 thread = self.get_thread(sample.tid, sample.pid)
74 thread.add_callchain(callchain, symbol, sample)
/system/bt/btif/src/
Dbtif_sock.cc54 static thread_t* thread; variable
68 CHECK(thread == NULL); in btif_sock_init()
92 thread = thread_new("btif_sock"); in btif_sock_init()
93 if (!thread) { in btif_sock_init()
99 status = btsock_sco_init(thread); in btif_sock_init()
110 thread_free(thread); in btif_sock_init()
111 thread = NULL; in btif_sock_init()
126 thread_free(thread); in btif_sock_cleanup()
127 thread = NULL; in btif_sock_cleanup()
/system/core/init/
Dueventd_test.cpp56 std::vector<std::thread> threads; in WriteFromMultipleThreads()
62 threads.emplace_back(std::thread(make_thread_function(file, parameter))); in WriteFromMultipleThreads()
65 for (auto& thread : threads) { in WriteFromMultipleThreads() local
66 thread.join(); in WriteFromMultipleThreads()
191 std::vector<std::thread> threads; in TEST()
193 [&]() { return std::thread(thread_function); }); in TEST()
197 for (auto& thread : threads) { in TEST() local
198 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/core/debuggerd/
Dcrash_dump.cpp407 for (pid_t thread : threads) { in main() local
409 if (thread == pseudothread_tid) { in main()
413 if (!ptrace_seize_thread(target_proc_fd, thread, &error)) { in main()
414 bool fatal = thread == g_target_thread; in main()
420 info.tid = thread; in main()
422 info.thread_name = get_thread_name(thread); in main()
424 if (!ptrace_interrupt(thread, &info.signo)) { in main()
425 PLOG(WARNING) << "failed to ptrace interrupt thread " << thread; in main()
426 ptrace(PTRACE_DETACH, thread, 0, 0); in main()
430 if (thread == g_target_thread) { in main()
[all …]
/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/core/debuggerd/libdebuggerd/
Dbacktrace.cpp62 void dump_backtrace_thread(int output_fd, BacktraceMap* map, const ThreadInfo& thread) { in dump_backtrace_thread() argument
67 _LOG(&log, logtype::BACKTRACE, "\n\"%s\" sysTid=%d\n", thread.thread_name.c_str(), thread.tid); in dump_backtrace_thread()
70 if (!Backtrace::Unwind(thread.registers.get(), map, &frames, 0, nullptr)) { in dump_backtrace_thread()
71 _LOG(&log, logtype::THREAD, "Unwind failed: tid = %d", thread.tid); in dump_backtrace_thread()
/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()

1234567