/system/bt/osi/test/ |
H A D | thread_test.cpp | 9 #include "osi/include/thread.h" 16 thread_t *thread = thread_new("test_thread"); local 17 ASSERT_TRUE(thread != NULL); 18 thread_free(thread); 22 thread_t *thread = thread_new("test_thread"); local 23 thread_free(thread); 27 thread_t *thread = thread_new("test_name"); local 28 ASSERT_STREQ(thread_name(thread), "test_name"); 29 thread_free(thread); 33 thread_t *thread local 39 thread_t *thread = thread_new("0123456789abcdefg"); local 45 thread_t *thread = (thread_t *)context; local 50 thread_t *thread = thread_new("test_thread"); local 56 thread_t *thread = thread_new("test_thread"); local [all...] |
H A D | semaphore_test.cpp | 12 #include "osi/include/thread.h" 75 thread_t *thread = thread_new("semaphore_test_thread"); local 76 ASSERT_TRUE(thread != NULL); 80 thread_post(thread, sleep_then_increment_counter, &sequence_helper); 86 thread_free(thread);
|
H A D | reactor_test.cpp | 15 static pthread_t thread; variable 29 int ret = pthread_create(&thread, NULL, reactor_thread, reactor); 34 pthread_join(thread, NULL);
|
H A D | alarm_test.cpp | 28 #include "osi/include/thread.h" 307 thread_t *thread = thread_new("timers.test_callback_ordering_on_queue.thread"); local 309 alarm_register_processing_queue(queue, thread); 336 thread_free(thread); 344 thread_t *thread = local 345 thread_new("timers.test_unregister_processing_queue.thread"); 347 alarm_register_processing_queue(queue, thread); 394 thread_free(thread); 402 thread_t *thread local [all...] |
/system/bt/hci/test/ |
H A D | low_power_manager_test.cpp | 29 #include "osi/include/thread.h" 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);
|
H A D | hci_layer_test.cpp | 80 static void flush_thread(thread_t *thread) { argument 82 thread_post(thread, signal_work_item, NULL); 84 thread_post(thread, signal_work_item, NULL); 331 STUB_FUNCTION(void, low_power_init, (UNUSED_ATTR thread_t *thread)) 630 // Not running on the internal thread, unlike the real hal
|
/system/extras/simpleperf/runtest/ |
H A D | function_pthread.cpp | 20 pthread_t thread; local 21 int ret = pthread_create(&thread, nullptr, ChildThreadFunction, nullptr); 27 ret = pthread_join(thread, nullptr);
|
/system/core/adb/ |
H A D | fdevent_test.h | 52 void TerminateThread(adb_thread_t thread) { argument 55 ASSERT_TRUE(adb_thread_join(thread));
|
H A D | sysdeps_test.cpp | 54 for (const auto& thread : threads) { 55 ASSERT_TRUE(adb_thread_join(thread)); 62 adb_thread_t thread; local 68 nullptr, &thread)); 69 ASSERT_TRUE(adb_thread_join(thread));
|
/system/extras/memory_replay/tests/ |
H A D | ThreadTest.cpp | 30 Thread thread; local 32 // A thread should be ready immediately. If not, this will hang forever. 33 thread.WaitForReady(); 38 Thread* thread = thread_data->first; local 41 thread->WaitForReady(); 48 Thread thread; local 50 thread_data_t thread_data = std::make_pair(&thread, &finish); 52 thread.SetPending(); 61 thread.ClearPending(); 68 Thread* thread local 78 Thread thread; local 96 Thread thread; local 104 Thread thread; local [all...] |
H A D | ThreadsTest.cpp | 28 Thread* thread = threads.CreateThread(900); local 29 ASSERT_TRUE(thread != nullptr); 33 ASSERT_EQ(thread, found_thread); 35 thread->CreateAction(0x1234, "thread_done", ""); 37 thread->SetPending(); 39 threads.Finish(thread); 90 Thread* thread = threads.CreateThread(900); local 91 ASSERT_TRUE(thread != nullptr); 97 thread->CreateAction(0x1234 + i, "malloc", "100"); 98 thread 117 Thread* thread = threads.CreateThread(900+i); local [all...] |
/system/extras/simpleperf/ |
H A D | dwarf_unwind.cpp | 97 std::vector<uint64_t> UnwindCallChain(ArchType arch, const ThreadEntry& thread, argument 111 std::vector<backtrace_map_t> bt_maps(thread.maps.size()); 113 for (auto& map : thread.maps) { 120 std::unique_ptr<BacktraceMap> backtrace_map(BacktraceMap::Create(thread.pid, bt_maps)); 128 Backtrace::CreateOffline(thread.pid, thread.tid, backtrace_map.get(), stack_info, true));
|
H A D | sample_tree.cpp | 35 const ThreadEntry* thread = thread_tree_->FindThreadOrNew(pid, tid); local 36 const MapEntry* map = thread_tree_->FindMap(thread, ip, in_kernel); 39 SampleEntry value(ip, time, period, 0, 1, thread, map, symbol); 49 const ThreadEntry* thread = thread_tree_->FindThreadOrNew(pid, tid); local 50 const MapEntry* from_map = thread_tree_->FindMap(thread, from_ip, false); 52 from_map = thread_tree_->FindMap(thread, from_ip, true); 55 const MapEntry* to_map = thread_tree_->FindMap(thread, to_ip, false); 57 to_map = thread_tree_->FindMap(thread, to_ip, true); 61 SampleEntry value(to_ip, time, period, 0, 1, thread, to_map, to_symbol); 76 const ThreadEntry* thread local [all...] |
/system/bt/btif/src/ |
H A D | btif_sock.c | 35 #include "osi/include/thread.h" 43 static thread_t *thread; variable 58 assert(thread == NULL); 79 thread = thread_new("btif_sock"); 80 if (!thread) { 81 LOG_ERROR(LOG_TAG, "%s error creating new thread.", __func__); 86 status = btsock_sco_init(thread); 96 thread_free(thread); 97 thread = NULL; 109 thread_stop(thread); [all...] |
H A D | btif_sock_sco.c | 38 #include "osi/include/thread.h" 90 static thread_t *thread; // Not owned, do not free. variable 101 thread = thread_; 173 socket_register(socket, thread_get_reactor(thread), sco_socket, socket_read_ready_cb, NULL); 192 // Must be called with |lock| held except during teardown when we know the socket thread
|
/system/extras/libfec/ |
H A D | fec_process.cpp | 30 /* thread function */ 35 debug("thread %d: [%" PRIu64 ", %" PRIu64 ")", p->id, p->offset, 74 debug("%d threads, %zu bytes per thread (total %zu)", threads, 98 pthread_t thread; local 100 if (pthread_create(&thread, NULL, __process, &info[i]) != 0) { 101 error("failed to create thread: %s", strerror(errno)); 104 handles.push_back(thread); 117 for (auto thread : handles) { 120 if (pthread_join(thread, (void **)&p) != 0) { 121 error("failed to join thread [all...] |
/system/extras/memory_replay/ |
H A D | Threads.cpp | 34 Thread* thread = reinterpret_cast<Thread*>(data); local 36 thread->WaitForPending(); 37 Action* action = thread->GetAction(); 38 thread->AddTimeNsecs(action->Execute(thread->pointers())); 40 thread->ClearPending(); 80 Thread* thread = FindEmptyEntry(tid); local 81 if (thread == nullptr) { 85 thread->tid_ = tid; 86 thread 140 Finish(Thread* thread) argument [all...] |
H A D | main.cpp | 103 Thread* thread = threads.FindThread(tid); local 104 if (thread == nullptr) { 105 thread = threads.CreateThread(tid); 108 // Wait for the thread to complete any previous actions before handling 110 thread->WaitForReady(); 112 Action* action = thread->CreateAction(key_pointer, type, line + line_pos); 120 // before triggering the action. Otherwise, another thread could 125 // Tell the thread to execute the action. 126 thread->SetPending(); 129 // Wait for the thread t [all...] |
/system/bt/hci/src/ |
H A D | hci_hal_mct.c | 41 static thread_t *thread; // Not owned by us variable 58 thread = upper_thread; 108 eager_reader_register(event_stream, thread_get_reactor(thread), event_event_stream_has_bytes, NULL); 109 eager_reader_register(acl_stream, thread_get_reactor(thread), event_acl_stream_has_bytes, NULL);
|
H A D | hci_inject.c | 35 #include "osi/include/thread.h" 56 static thread_t *thread; variable 70 assert(thread == NULL); 76 thread = thread_new("hci_inject"); 77 if (!thread) 91 socket_register(listen_socket, thread_get_reactor(thread), NULL, accept_ready, NULL); 106 thread_free(thread); 109 thread = NULL; 145 socket_register(socket, thread_get_reactor(thread), client, read_ready, NULL);
|
H A D | hci_hal_h4.c | 31 #include "osi/include/thread.h" 37 // Increased HCI thread priority to keep up with the audio sub-system 48 static thread_t *thread; // Not owned by us variable 66 thread = upper_thread; 97 eager_reader_register(uart_stream, thread_get_reactor(thread), event_uart_has_bytes, NULL); 99 // Raise thread priorities to keep up with audio 100 thread_set_priority(thread, HCI_THREAD_PRIORITY);
|
H A D | low_power_manager.c | 29 #include "osi/include/thread.h" 69 static thread_t *thread; variable 81 thread = post_thread; 105 thread_post(thread, event_functions[command], NULL); 185 thread_post(thread, event_idle_timeout, NULL);
|
/system/bt/osi/src/ |
H A D | thread.c | 21 #include "osi/include/thread.h" 49 thread_t *thread; member in struct:start_arg 85 start.thread = ret; 109 void thread_free(thread_t *thread) { argument 110 if (!thread) 113 thread_stop(thread); 114 thread_join(thread); 116 fixed_queue_free(thread->work_queue, osi_free); 117 reactor_free(thread->reactor); 118 osi_free(thread); 121 thread_join(thread_t *thread) argument 131 thread_post(thread_t *thread, thread_fn func, void *context) argument 148 thread_stop(thread_t *thread) argument 153 thread_set_priority(thread_t *thread, int priority) argument 167 thread_is_self(const thread_t *thread) argument 172 thread_get_reactor(const thread_t *thread) argument 177 thread_name(const thread_t *thread) argument 186 thread_t *thread = start->thread; local [all...] |
/system/core/libbacktrace/ |
H A D | backtrace_offline_test.cpp | 78 // Create a thread to generate the needed stack and registers information. 87 pthread_t thread; local 90 ASSERT_EQ(0, pthread_create(&thread, &attr, OfflineThreadFunc, &arg)); 91 // Wait for the offline thread to generate the stack and unw_context information. 97 ASSERT_EQ(0, pthread_join(thread, nullptr));
|
/system/vold/bench/ |
H A D | benchgen.py | 35 def __init__(self, thread, time, call, args, ret): 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))
|