Home
last modified time | relevance | path

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

123456789

/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.cc76 MessageLoopThread thread("semaphore_test_thread"); in TEST_F() local
77 thread.StartUp(); in TEST_F()
78 ASSERT_TRUE(thread.IsRunning()); in TEST_F()
82 thread.DoInThread(FROM_HERE, in TEST_F()
89 thread.ShutDown(); 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/simpleperf/
Dcmd_trace_sched.cpp224 auto& thread = thread_map_[r.data->tid]; in ProcessRecord() local
225 thread.process_id = r.data->pid; in ProcessRecord()
226 thread.thread_id = r.data->tid; in ProcessRecord()
227 thread.name = r.comm; in ProcessRecord()
258 ThreadInfo& thread = thread_map_[record.tid_data.tid]; in ProcessSampleRecord() local
259 thread.process_id = record.tid_data.pid; in ProcessSampleRecord()
260 thread.thread_id = record.tid_data.tid; in ProcessSampleRecord()
261 thread.name = thread_name; in ProcessSampleRecord()
262 thread.total_runtime_in_ns += runtime; in ProcessSampleRecord()
263 SpinInfo& spin_info = thread.spin_info; in ProcessSampleRecord()
[all …]
DRecordReadThread_test.cpp236 RecordReadThread thread(128 * 1024, event_fds[0]->attr(), 1, 1); in TEST_F() local
243 ASSERT_TRUE(thread.RegisterDataCallback(loop, callback)); in TEST_F()
244 ASSERT_TRUE(thread.AddEventFds(event_fds)); in TEST_F()
245 ASSERT_TRUE(thread.SyncKernelBuffer()); in TEST_F()
248 ASSERT_TRUE(thread.GetRecord()); in TEST_F()
249 ASSERT_TRUE(thread.RemoveEventFds(event_fds)); in TEST_F()
250 ASSERT_TRUE(thread.StopReadThread()); in TEST_F()
255 RecordReadThread thread(128 * 1024, attr, 1, 1); in TEST_F() local
260 std::unique_ptr<Record> r = thread.GetRecord(); in TEST_F()
272 ASSERT_TRUE(thread.RegisterDataCallback(loop, callback)); in TEST_F()
[all …]
Dthread_tree_test.cpp37 ThreadEntry* thread = thread_tree_.FindThreadOrNew(0, 0); in CheckMaps() local
38 ASSERT_TRUE(thread != nullptr); in CheckMaps()
39 ASSERT_TRUE(thread->maps != nullptr); in CheckMaps()
41 for (auto& pair : thread->maps->maps) { in CheckMaps()
57 const MapEntry* entry = thread_tree_.FindMap(thread, i, false); in CheckMaps()
102 ThreadEntry* thread = thread_tree_.FindThreadOrNew(0, 0); in TEST_F() local
103 ASSERT_TRUE(thread != nullptr); in TEST_F()
104 const MapEntry* map = thread_tree_.FindMap(thread, 0); in TEST_F()
DIOEventLoop_test.cpp50 std::thread thread([&]() { in TEST() local
58 thread.join(); in TEST()
84 std::thread thread([&]() { in TEST() local
97 thread.join(); in TEST()
112 std::thread thread([&]() { in TEST() local
120 thread.join(); in TEST()
170 std::thread thread([&]() { in TEST() local
178 thread.join(); in TEST()
/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/bt/gd/os/linux_generic/
Dthread_unittest.cc32 …explicit SampleReactable(Thread* thread) : thread_(thread), fd_(eventfd(0, 0)), is_same_thread_che… in SampleReactable() argument
59 thread = new Thread("test", Thread::Priority::NORMAL); in SetUp()
63 delete thread; in TearDown()
65 Thread* thread = nullptr; member in bluetooth::os::__anon52d6cbf20111::ThreadTest
69 thread->Stop(); in TEST_F()
73 EXPECT_EQ(thread->GetThreadName(), "test"); in TEST_F()
77 EXPECT_NE(thread->ToString().find("test"), std::string::npos); in TEST_F()
81 EXPECT_FALSE(thread->IsSameThread()); in TEST_F()
85 Reactor* reactor = thread->GetReactor(); in TEST_F()
86 SampleReactable sample_reactable(thread); in TEST_F()
Dreactor_unittest.cc122 auto reactor_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
128 auto reactor_thread = std::thread(&Reactor::Stop, reactor_); in TEST_F()
129 auto another_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
135 auto reactor_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
154 auto reactor_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
166 auto reactor_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
185 auto reactor_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
199 auto reactor_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
215 auto reactor_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
237 auto reactor_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
[all …]
/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()
DMapInfoGetBuildIDTest.cpp96 std::vector<std::thread*> threads; in MultipleThreadTest()
103 std::thread* thread = new std::thread([i, this, &wait, &build_id_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()
/system/core/base/
Dproperties_test.cpp133 std::thread thread([&]() { in TEST() local
143 thread.join(); in TEST()
167 std::thread thread([&]() { in TEST() local
178 thread.join(); in TEST()
187 std::thread thread([&]() { in TEST() local
198 thread.join(); in TEST()
206 std::thread thread([&]() { in TEST() local
213 thread.join(); in TEST()
/system/core/init/
Dueventd_test.cpp55 std::vector<std::thread> threads; in WriteFromMultipleThreads()
61 threads.emplace_back(std::thread(make_thread_function(file, parameter))); in WriteFromMultipleThreads()
64 for (auto& thread : threads) { in WriteFromMultipleThreads() local
65 thread.join(); in WriteFromMultipleThreads()
190 std::vector<std::thread> threads; in TEST()
192 [&]() { return std::thread(thread_function); }); in TEST()
196 for (auto& thread : threads) { in TEST() local
197 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/scripts/inferno/
Dinferno.py139 main_threads = [thread for thread in process.threads.values() if thread.tid == thread.pid]
144 for thread in process.threads.values():
145 min_event_count = thread.num_events * args.min_callchain_percentage * 0.01
146 thread.flamegraph.trim_callchain(min_event_count)
219 for thread in sorted(process.threads.values(), key=lambda x: x.num_events, reverse=True):
221 (thread.tid, thread.name))
223 (thread_name, thread.num_samples))
224 render_svg(process, thread.flamegraph, f, args.color)
234 for thread in process.threads.values():
235 thread.flamegraph.generate_offset(0)
/system/bt/common/
Dmessage_loop_thread_unittest.cc289 base::BindOnce([](MessageLoopThread* thread) { thread->IsRunning(); }, in TEST_F() argument
299 auto thread = std::thread(&MessageLoopThread::ShutDown, &message_loop_thread); in TEST_F() local
301 thread.join(); in TEST_F()
309 auto thread = std::thread(&MessageLoopThread::StartUp, &message_loop_thread); in TEST_F() local
310 thread.join(); in TEST_F()
318 auto thread = std::thread(&MessageLoopThread::ShutDown, &message_loop_thread); in TEST_F() local
319 thread.join(); in TEST_F()
328 auto thread = std::thread(&MessageLoopThread::StartUp, &message_loop_thread); in TEST_F() local
329 thread.join(); in TEST_F()
/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/libprocinfo/testdata/
Dmaps351 704defa000-704defb000 ---p 00000000 00:00 0 [anon:thread stack guard]
355 704e455000-704e456000 ---p 00000000 00:00 0 [anon:thread stack guard]
362 704e69d000-704e69e000 ---p 00000000 00:00 0 [anon:thread stack guard]
365 704f79b000-704f79c000 ---p 00000000 00:00 0 [anon:thread stack guard]
367 704f899000-704f89a000 ---p 00000000 00:00 0 [anon:thread stack guard]
420 7051326000-7051327000 ---p 00000000 00:00 0 [anon:thread stack guard]
546 705ddf8000-705ddf9000 ---p 00000000 00:00 0 [anon:thread stack guard]
550 705f5ec000-705f5ed000 ---p 00000000 00:00 0 [anon:thread stack guard]
554 705f7e8000-705f7e9000 ---p 00000000 00:00 0 [anon:thread stack guard]
557 705f8ee000-705f8ef000 ---p 00000000 00:00 0 [anon:thread stack guard]
[all …]
/system/bt/btif/src/
Dbtif_sock.cc56 static thread_t* thread; variable
70 CHECK(thread == NULL); in btif_sock_init()
94 thread = thread_new("btif_sock"); in btif_sock_init()
95 if (!thread) { in btif_sock_init()
101 status = btsock_sco_init(thread); in btif_sock_init()
112 thread_free(thread); in btif_sock_init()
113 thread = NULL; in btif_sock_init()
128 thread_free(thread); in btif_sock_cleanup()
129 thread = NULL; in btif_sock_cleanup()
/system/core/debuggerd/libdebuggerd/
Dbacktrace.cpp63 const ThreadInfo& thread) { in dump_backtrace_thread() argument
68 _LOG(&log, logtype::BACKTRACE, "\n\"%s\" sysTid=%d\n", thread.thread_name.c_str(), thread.tid); in dump_backtrace_thread()
70 unwinder->SetRegs(thread.registers.get()); in dump_backtrace_thread()
73 _LOG(&log, logtype::THREAD, "Unwind failed: tid = %d", thread.tid); in dump_backtrace_thread()

123456789