Home
last modified time | relevance | path

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

12

/system/bt/osi/test/
Dthread_test.cpp17 thread_t *thread = thread_new("test_thread"); in TEST_F() local
18 ASSERT_TRUE(thread != NULL); in TEST_F()
19 thread_free(thread); in TEST_F()
23 thread_t *thread = thread_new("test_thread"); in TEST_F() local
24 thread_free(thread); in TEST_F()
28 thread_t *thread = thread_new("test_name"); in TEST_F() local
29 ASSERT_STREQ(thread_name(thread), "test_name"); in TEST_F()
30 thread_free(thread); in TEST_F()
34 thread_t *thread = thread_new("0123456789abcdef"); in TEST_F() local
35 ASSERT_STREQ("0123456789abcdef", thread_name(thread)); in TEST_F()
[all …]
Dreactor_test.cpp15 static pthread_t thread; variable
29 int ret = pthread_create(&thread, NULL, reactor_thread, reactor); in spawn_reactor_thread()
34 pthread_join(thread, NULL); in join_reactor_thread()
/system/bt/osi/src/
Dthread.c48 thread_t *thread; member
86 start.thread = ret; in thread_new_sized()
110 void thread_free(thread_t *thread) { in thread_free() argument
111 if (!thread) in thread_free()
114 thread_stop(thread); in thread_free()
115 thread_join(thread); in thread_free()
117 fixed_queue_free(thread->work_queue, osi_free); in thread_free()
118 reactor_free(thread->reactor); in thread_free()
119 osi_free(thread); in thread_free()
122 void thread_join(thread_t *thread) { in thread_join() argument
[all …]
/system/bt/osi/include/
Dthread.h43 void thread_free(thread_t *thread);
48 void thread_join(thread_t *thread);
54 bool thread_post(thread_t *thread, thread_fn func, void *context);
59 void thread_stop(thread_t *thread);
64 bool thread_set_priority(thread_t *thread, int priority);
68 bool thread_is_self(const thread_t *thread);
70 reactor_t *thread_get_reactor(const thread_t *thread);
73 const char *thread_name(const thread_t *thread);
/system/bt/btif/src/
Dbtif_sock.c41 static thread_t *thread; variable
56 assert(thread == NULL); in btif_sock_init()
77 thread = thread_new("btif_sock"); in btif_sock_init()
78 if (!thread) { in btif_sock_init()
84 status = btsock_sco_init(thread); in btif_sock_init()
94 thread_free(thread); in btif_sock_init()
95 thread = NULL; in btif_sock_init()
106 thread_stop(thread); in btif_sock_cleanup()
107 thread_join(thread); in btif_sock_cleanup()
112 thread_free(thread); in btif_sock_cleanup()
[all …]
Dbtif_sock_sco.c87 static thread_t *thread; // Not owned, do not free. variable
98 thread = thread_; in btsock_sco_init()
170 socket_register(socket, thread_get_reactor(thread), sco_socket, socket_read_ready_cb, NULL); in sco_socket_establish_locked()
/system/bt/hci/test/
Dlow_power_manager_test.cpp41 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);
124 thread_free(thread);
Dhci_hal_mct_test.cpp152 thread = thread_new("hal_test");
155 EXPECT_TRUE(hal->init(&callbacks, thread));
168 thread_free(thread);
177 thread_t *thread;
Dhci_hal_h4_test.cpp152 thread = thread_new("hal_test");
155 EXPECT_TRUE(hal->init(&callbacks, thread));
168 thread_free(thread);
174 thread_t *thread;
/system/bt/hci/src/
Dhci_inject.c55 static thread_t *thread; variable
69 assert(thread == NULL); in hci_inject_open()
75 thread = thread_new("hci_inject"); in hci_inject_open()
76 if (!thread) in hci_inject_open()
90 socket_register(listen_socket, thread_get_reactor(thread), NULL, accept_ready, NULL); in hci_inject_open()
105 thread_free(thread); in hci_inject_close()
108 thread = NULL; in hci_inject_close()
149 socket_register(socket, thread_get_reactor(thread), client, read_ready, NULL); in accept_ready()
Dhci_layer.c123 static thread_t *thread; // We own this variable
219 thread = thread_new("hci_thread"); in start_up()
220 if (!thread) { in start_up()
235 …fixed_queue_register_dequeue(command_queue, thread_get_reactor(thread), event_command_ready, NULL); in start_up()
236 fixed_queue_register_dequeue(packet_queue, thread_get_reactor(thread), event_packet_ready, NULL); in start_up()
239 hal->init(&hal_callbacks, thread); in start_up()
240 low_power_manager->init(thread); in start_up()
268 thread_post(thread, event_finish_startup, NULL); in start_up()
280 if (thread) { in shut_down()
283 thread_post(thread, event_epilog, NULL); in shut_down()
[all …]
Dlow_power_manager.c68 static thread_t *thread; variable
79 thread = post_thread; in init()
103 thread_post(thread, event_functions[command], NULL); in post_command()
183 thread_post(thread, event_idle_timeout, NULL); in idle_timer_expired()
Dhci_hal_h4.c45 static thread_t *thread; // Not owned by us variable
63 thread = upper_thread; in hal_init()
94 eager_reader_register(uart_stream, thread_get_reactor(thread), event_uart_has_bytes, NULL); in hal_open()
97 thread_set_priority(thread, HCI_THREAD_PRIORITY); in hal_open()
Dhci_hal_mct.c40 static thread_t *thread; // Not owned by us variable
57 thread = upper_thread; in hal_init()
107 …eager_reader_register(event_stream, thread_get_reactor(thread), event_event_stream_has_bytes, NULL… in hal_open()
108 eager_reader_register(acl_stream, thread_get_reactor(thread), event_acl_stream_has_bytes, NULL); in hal_open()
/system/extras/simpleperf/
Denvironment.cpp291 ThreadComm thread; in GetThreadComm() local
292 thread.tid = tid; in GetThreadComm()
293 thread.tgid = tgid; in GetThreadComm()
294 thread.comm = comm; in GetThreadComm()
295 thread.is_process = (tid == pid); in GetThreadComm()
296 thread_comms->push_back(thread); in GetThreadComm()
340 ThreadMmap thread; in GetThreadMmapsInProcess() local
341 thread.start_addr = start_addr; in GetThreadMmapsInProcess()
342 thread.len = end_addr - start_addr; in GetThreadMmapsInProcess()
343 thread.pgoff = pgoff; in GetThreadMmapsInProcess()
[all …]
Dcmd_record.cpp286 for (auto& thread : thread_comms) { in DumpThreadCommAndMmaps() local
287 CommRecord record = CreateCommRecord(attr, thread.tgid, thread.tid, thread.comm); in DumpThreadCommAndMmaps()
291 if (thread.is_process) { in DumpThreadCommAndMmaps()
293 if (!GetThreadMmapsInProcess(thread.tgid, &thread_mmaps)) { in DumpThreadCommAndMmaps()
302 CreateMmapRecord(attr, false, thread.tgid, thread.tid, thread_mmap.start_addr, in DumpThreadCommAndMmaps()
/system/core/libbacktrace/
Dbacktrace_test.cpp75 thread_t thread; member
191 thread_t* thread = reinterpret_cast<thread_t*>(data); in ThreadSetState() local
192 android_atomic_acquire_store(1, &thread->state); in ThreadSetState()
194 while (thread->state) { in ThreadSetState()
428 pthread_t thread; in TEST() local
429 ASSERT_TRUE(pthread_create(&thread, &attr, PtraceThreadLevelRun, nullptr) == 0); in TEST()
487 thread_t* thread = reinterpret_cast<thread_t*>(data); in ThreadLevelRun() local
489 thread->tid = gettid(); in ThreadLevelRun()
500 pthread_t thread; in TEST() local
501 ASSERT_TRUE(pthread_create(&thread, &attr, ThreadLevelRun, &thread_data) == 0); in TEST()
[all …]
/system/netd/server/
DDnsProxyListener.cpp68 pthread_t thread; in start() local
69 pthread_create(&thread, NULL, in start()
71 pthread_detach(thread); in start()
329 pthread_t thread; in start() local
330 pthread_create(&thread, NULL, in start()
332 pthread_detach(thread); in start()
446 pthread_t thread; in start() local
447 pthread_create(&thread, NULL, in start()
449 pthread_detach(thread); in start()
/system/vold/bench/
Dbenchgen.py35 def __init__(self, thread, time, call, args, ret): argument
36 self.thread = thread
69 handle = "t%sf%s" % (e.thread, fd)
114 thread = int(fn.split(".")[-1]) variable
125 events.append(Event(thread, time, call, args, ret))
/system/core/libsync/tests/
Dsync_test.cpp359 thread waitThread{ in TEST()
386 thread waitThread{ in TEST()
466 thread a{threadMain, 0}; in TEST()
467 thread b{threadMain, 1}; in TEST()
483 vector<thread> threads; in TEST_P()
513 threads.push_back(thread{threadMain, i}); in TEST_P()
542 for_each(begin(threads), end(threads), [](thread& thread) { thread.join(); }); in TEST_P() argument
/system/bt/btif/include/
Dbtif_sock_sco.h25 bt_status_t btsock_sco_init(thread_t *thread);
/system/vold/
DTrimTask.h43 std::thread mThread;
DMoveTask.h38 std::thread mThread;
/system/core/libutils/
DThreads.cpp158 pthread_t thread; in androidCreateRawThreadEtc() local
159 int result = pthread_create(&thread, &attr, in androidCreateRawThreadEtc()
173 *threadId = (android_thread_id_t)thread; // XXX: this is not portable in androidCreateRawThreadEtc()
179 static pthread_t android_thread_id_t_to_pthread(android_thread_id_t thread) in android_thread_id_t_to_pthread() argument
181 return (pthread_t) thread; in android_thread_id_t_to_pthread()
/system/bt/doc/
Dpower_management.md8 PM code via the BTA workqueue thread.
30 through the BTA workqueue thread and the `bta_dm_pm_btm_status` function. Since
32 controller, timers are used to post messages to the BTA workqueue thread as
147 made through the BTA workqueue thread to `bta_dm_pm_btm_cback`, which then
149 responses are also fired as messages through the BTA workqueue thread, which are
159 `tBTA_DM_PM_BTM_STATUS` struct and posts it to the BTA workqueue thread via
163 **Determine if this is running on the workqueue thread or not**
200 sends off an event to the BTA workqueue thread.

12