Home
last modified time | relevance | path

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

12345678910>>...20

/packages/modules/Bluetooth/system/osi/src/
Dthread.cc54 thread_t* thread; member
88 start.thread = ret; in thread_new_sized()
111 void thread_free(thread_t* thread) { in thread_free() argument
112 if (!thread) return; 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 …]
/packages/modules/Bluetooth/system/osi/test/
Dthread_test.cc12 thread_t* thread = thread_new("test_thread"); in TEST_F() local
13 ASSERT_TRUE(thread != NULL); in TEST_F()
14 thread_free(thread); in TEST_F()
18 thread_t* thread = thread_new("test_thread"); in TEST_F() local
19 thread_free(thread); in TEST_F()
23 thread_t* thread = thread_new("test_name"); in TEST_F() local
24 ASSERT_STREQ(thread_name(thread), "test_name"); in TEST_F()
25 thread_free(thread); in TEST_F()
29 thread_t* thread = thread_new("0123456789abcdef"); in TEST_F() local
30 ASSERT_STREQ("0123456789abcdef", thread_name(thread)); in TEST_F()
[all …]
/packages/modules/Bluetooth/system/test/mock/
Dmock_osi_thread.h42 std::function<void(thread_t* thread)> body{[](thread_t* /* thread */) {}};
43 void operator()(thread_t* thread) { body(thread); }; in operator()
52 std::function<reactor_t*(const thread_t* thread)> body{
54 reactor_t* operator()(const thread_t* thread) { return body(thread); }; in operator()
63 std::function<bool(const thread_t* thread)> body{
65 bool operator()(const thread_t* thread) { return body(thread); }; in operator()
73 std::function<void(thread_t* thread)> body{[](thread_t* /* thread */) {}};
74 void operator()(thread_t* thread) { body(thread); }; in operator()
83 std::function<const char*(const thread_t* thread)> body{
85 const char* operator()(const thread_t* thread) { return body(thread); }; in operator()
[all …]
Dmock_osi_thread.cc52 void thread_free(thread_t* thread) { in thread_free() argument
54 test::mock::osi_thread::thread_free(thread); in thread_free()
56 reactor_t* thread_get_reactor(const thread_t* thread) { in thread_get_reactor() argument
58 return test::mock::osi_thread::thread_get_reactor(thread); in thread_get_reactor()
60 bool thread_is_self(const thread_t* thread) { in thread_is_self() argument
62 return test::mock::osi_thread::thread_is_self(thread); in thread_is_self()
64 void thread_join(thread_t* thread) { in thread_join() argument
66 test::mock::osi_thread::thread_join(thread); in thread_join()
68 const char* thread_name(const thread_t* thread) { in thread_name() argument
70 return test::mock::osi_thread::thread_name(thread); in thread_name()
[all …]
/packages/modules/Bluetooth/system/test/fake/
Dfake_looper.cc50 thread_t* thread = nullptr; in run_message_loop() local
54 thread = start_arg->thread; in run_message_loop()
55 thread->set_state(thread_t::State::RUNNING); in run_message_loop()
60 thread->tid_ = get_thread_id(); in run_message_loop()
62 thread->name_, thread->tid_); in run_message_loop()
64 while (thread->is_running()) { in run_message_loop()
65 thread->work_queue_semaphore.wait(); in run_message_loop()
69 std::lock_guard<std::mutex> lock(thread->work_queue_semaphore.mutex_); in run_message_loop()
70 num_work_items = thread->work_queue.size(); in run_message_loop()
76 std::lock_guard<std::mutex> lock(thread->work_queue_semaphore.mutex_); in run_message_loop()
[all …]
/packages/modules/Bluetooth/system/gd/os/linux_generic/
Dthread_unittest.cc33 …explicit SampleReactable(Thread* thread) : thread_(thread), fd_(eventfd(0, 0)), is_same_thread_che… in SampleReactable() argument
60 thread = new Thread("test", Thread::Priority::NORMAL); in SetUp()
64 delete thread; in TearDown()
66 Thread* thread = nullptr; member in bluetooth::os::__anonbf63a0bf0111::ThreadTest
70 thread->Stop(); in TEST_F()
74 EXPECT_EQ(thread->GetThreadName(), "test"); in TEST_F()
78 EXPECT_NE(thread->ToString().find("test"), std::string::npos); in TEST_F()
82 EXPECT_FALSE(thread->IsSameThread()); in TEST_F()
86 Reactor* reactor = thread->GetReactor(); in TEST_F()
87 SampleReactable sample_reactable(thread); in TEST_F()
Dreactor_unittest.cc170 auto reactor_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
176 auto reactor_thread = std::thread(&Reactor::Stop, reactor_); in TEST_F()
177 auto another_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
183 auto reactor_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
202 auto reactor_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
214 auto reactor_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
235 auto reactor_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
253 auto reactor_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
272 auto reactor_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
289 auto reactor_thread = std::thread(&Reactor::Run, reactor_); in TEST_F()
[all …]
/packages/modules/Bluetooth/system/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);
/packages/apps/Camera2/src/com/android/camera/async/
DHandlerFactory.java32 final HandlerThread thread = new HandlerThread(threadName); in create() local
33 thread.start(); in create()
38 thread.quitSafely(); in create()
42 return new Handler(thread.getLooper()); in create()
52 final HandlerThread thread = new HandlerThread(threadName); in create() local
53 thread.start(); in create()
54 thread.setPriority(javaThreadPriority); in create()
59 thread.quitSafely(); in create()
63 return new Handler(thread.getLooper()); in create()
/packages/modules/AdServices/shared/libraries/side-less/java/com/android/adservices/shared/testing/
DAbstractProcessLifeguardRule.java63 Thread thread, in ignoreUncaughtBackgroundException() argument
71 uncaughtThrowable, thread, mMode, allTests.size(), lastTests.size()); in ignoreUncaughtBackgroundException()
77 Thread thread, in newUncaughtBackgroundException() argument
86 + thread in newUncaughtBackgroundException()
99 Thread thread, in newUncaughtBackgroundException() argument
115 + thread in newUncaughtBackgroundException()
162 Thread thread = sMyHandler.thread; in evaluate() local
172 thread, in evaluate()
178 testName, thread, sAllTestsSoFar, lastTests, uncaughtThrowable); in evaluate()
182 sRealHandler.uncaughtException(sMyHandler.thread, uncaughtThrowable); in evaluate()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/util/
DProfile.java42 Thread thread; field in Profile.WatchEntry
77 public synchronized void addWatchEntry(Thread thread, int cycleTime) { in addWatchEntry() argument
79 e.thread = thread; in addWatchEntry()
87 public synchronized void removeWatchEntry(Thread thread) { in removeWatchEntry() argument
89 if (mList.get(i).thread == thread) { in removeWatchEntry()
112 Thread thread = entry.thread; in processList() local
126 Thread thread = entry.thread; in sampleStack() local
127 StackTraceElement[] stack = thread.getStackTrace(); in sampleStack()
139 private WatchEntry findEntry(Thread thread) { in findEntry() argument
142 if (entry.thread == thread) return entry; in findEntry()
/packages/modules/Connectivity/thread/service/java/com/android/server/thread/
DThreadNetworkControllerService.java15 package com.android.server.thread;
21 import static android.net.thread.ActiveOperationalDataset.CHANNEL_PAGE_24_GHZ;
22 import static android.net.thread.ActiveOperationalDataset.LENGTH_EXTENDED_PAN_ID;
23 import static android.net.thread.ActiveOperationalDataset.LENGTH_MESH_LOCAL_PREFIX_BITS;
24 import static android.net.thread.ActiveOperationalDataset.LENGTH_NETWORK_KEY;
25 import static android.net.thread.ActiveOperationalDataset.LENGTH_PSKC;
26 import static android.net.thread.ActiveOperationalDataset.MESH_LOCAL_PREFIX_FIRST_BYTE;
27 import static android.net.thread.ActiveOperationalDataset.SecurityPolicy.DEFAULT_ROTATION_TIME_HOUR…
28 import static android.net.thread.ThreadNetworkController.DEVICE_ROLE_DETACHED;
29 import static android.net.thread.ThreadNetworkController.STATE_DISABLED;
[all …]
/packages/modules/Bluetooth/system/stack/test/btm/
Dstack_btm_dm_inq_db_test.cc63 thread_t* thread = new thread_t; in SetUp() local
64 thread->name_ = std::string(name); in SetUp()
66 start_arg.thread = thread; in SetUp()
67 pthread_create(&thread->pthread_, nullptr, run_message_loop, &start_arg); in SetUp()
70 return thread; in SetUp()
73 [](thread_t* thread, thread_func func, void* context) -> bool { in SetUp() argument
74 if (!thread->is_running()) return false; in SetUp()
76 std::lock_guard<std::mutex> lock(thread->work_queue_semaphore.mutex_); in SetUp()
77 thread->work_queue.push(std::make_pair(func, context)); in SetUp()
79 thread->work_queue_semaphore.notify(); in SetUp()
[all …]
/packages/modules/Connectivity/thread/framework/java/android/net/thread/
DIThreadNetworkController.aidl17 package android.net.thread;
19 import android.net.thread.ActiveOperationalDataset;
20 import android.net.thread.ChannelMaxPower;
21 import android.net.thread.IActiveOperationalDatasetReceiver;
22 import android.net.thread.IOperationalDatasetCallback;
23 import android.net.thread.IOperationReceiver;
24 import android.net.thread.IScheduleMigrationReceiver;
25 import android.net.thread.IStateCallback;
26 import android.net.thread.PendingOperationalDataset;
/packages/modules/AdServices/shared/libraries/device-side/java/com/android/adservices/shared/testing/
DProcessLifeguardRule.java49 Thread thread, in ignoreUncaughtBackgroundException() argument
54 testName, thread, allTests, lastTests, uncaughtThrowable); in ignoreUncaughtBackgroundException()
56 testName, thread, allTests, lastTests, /* testFailure= */ null, uncaughtThrowable); in ignoreUncaughtBackgroundException()
62 Thread thread, in newUncaughtBackgroundException() argument
67 testName, thread, allTests, lastTests, /* testFailure= */ null, uncaughtThrowable); in newUncaughtBackgroundException()
69 testName, thread, allTests, lastTests, uncaughtThrowable); in newUncaughtBackgroundException()
75 Thread thread, in newUncaughtBackgroundException() argument
80 writeToTestStorage(testName, thread, allTests, lastTests, testFailure, uncaughtThrowable); in newUncaughtBackgroundException()
82 testName, thread, allTests, lastTests, testFailure, uncaughtThrowable); in newUncaughtBackgroundException()
87 Thread thread, in writeToTestStorage() argument
[all …]
/packages/apps/Dialer/java/com/android/dialer/common/concurrent/
DDialerExecutorModule.java63 Thread thread = new Thread(runnable, "DialerExecutors-LowPriority"); in provideNonUiThreadPool()
65 thread.setPriority(4); in provideNonUiThreadPool()
66 return thread; in provideNonUiThreadPool()
80 Thread thread = new Thread(runnable, "DialerExecutors-LowPriority-Serial");
82 thread.setPriority(4);
83 return thread;
103 Thread thread = new Thread(runnable, "DialerExecutors-HighPriority-Serial");
105 thread.setPriority(5);
106 return thread;
/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DDownloadJobService.java67 final DownloadThread thread; in onStartJob() local
73 thread = new DownloadThread(this, params, info); in onStartJob()
74 mActiveThreads.put(id, thread); in onStartJob()
76 thread.start(); in onStartJob()
86 final DownloadThread thread; in onStopJob() local
88 thread = mActiveThreads.removeReturnOld(id); in onStopJob()
90 if (thread != null) { in onStopJob()
94 thread.requestShutdown(); in onStopJob()
/packages/modules/Connectivity/thread/tests/integration/src/android/net/thread/
DThreadIntegrationTest.java17 package android.net.thread;
19 import static android.net.thread.ThreadNetworkController.DEVICE_ROLE_DETACHED;
20 import static android.net.thread.ThreadNetworkController.DEVICE_ROLE_LEADER;
21 import static android.net.thread.ThreadNetworkController.DEVICE_ROLE_STOPPED;
22 import static android.net.thread.utils.IntegrationTestUtils.CALLBACK_TIMEOUT;
23 import static android.net.thread.utils.IntegrationTestUtils.RESTART_JOIN_TIMEOUT;
24 import static android.net.thread.utils.IntegrationTestUtils.getIpv6LinkAddresses;
25 import static android.net.thread.utils.IntegrationTestUtils.getPrefixesFromNetData;
26 import static android.net.thread.utils.IntegrationTestUtils.getThreadNetwork;
27 import static android.net.thread.utils.IntegrationTestUtils.isInMulticastGroup;
[all …]
DBorderRoutingTest.java17 package android.net.thread;
20 import static android.net.thread.utils.IntegrationTestUtils.JOIN_TIMEOUT;
21 import static android.net.thread.utils.IntegrationTestUtils.getIpv6LinkAddresses;
22 import static android.net.thread.utils.IntegrationTestUtils.isExpectedIcmpv6Packet;
23 import static android.net.thread.utils.IntegrationTestUtils.isFromIpv6Source;
24 import static android.net.thread.utils.IntegrationTestUtils.isInMulticastGroup;
25 import static android.net.thread.utils.IntegrationTestUtils.isToIpv6Destination;
26 import static android.net.thread.utils.IntegrationTestUtils.newPacketReader;
27 import static android.net.thread.utils.IntegrationTestUtils.pollForPacket;
28 import static android.net.thread.utils.IntegrationTestUtils.sendUdpMessage;
[all …]
DServiceDiscoveryTest.java17 package android.net.thread;
21 import static android.net.thread.utils.IntegrationTestUtils.JOIN_TIMEOUT;
22 import static android.net.thread.utils.IntegrationTestUtils.SERVICE_DISCOVERY_TIMEOUT;
23 import static android.net.thread.utils.IntegrationTestUtils.discoverForServiceLost;
24 import static android.net.thread.utils.IntegrationTestUtils.discoverService;
25 import static android.net.thread.utils.IntegrationTestUtils.resolveService;
26 import static android.net.thread.utils.IntegrationTestUtils.resolveServiceUntil;
27 import static android.net.thread.utils.IntegrationTestUtils.waitFor;
40 import android.net.thread.utils.FullThreadDevice;
41 import android.net.thread.utils.OtDaemonController;
[all …]
/packages/modules/DnsResolver/tests/
Dresolv_stress_test.cpp48 std::vector<std::thread> threads(num_threads); in RunGetAddrInfoStressTest()
49 for (std::thread& thread : threads) { in RunGetAddrInfoStressTest()
50 thread = std::thread([&mappings, num_queries]() { in RunGetAddrInfoStressTest()
71 for (std::thread& thread : threads) { in RunGetAddrInfoStressTest()
72 thread.join(); in RunGetAddrInfoStressTest()
/packages/modules/Bluetooth/system/common/
Dmessage_loop_thread_unittest.cc291 base::BindOnce([](MessageLoopThread* thread) { thread->IsRunning(); }, in TEST_F() argument
301 auto thread = std::thread(&MessageLoopThread::ShutDown, &message_loop_thread); in TEST_F() local
303 thread.join(); in TEST_F()
311 auto thread = std::thread(&MessageLoopThread::StartUp, &message_loop_thread); in TEST_F() local
312 thread.join(); in TEST_F()
320 auto thread = std::thread(&MessageLoopThread::ShutDown, &message_loop_thread); in TEST_F() local
321 thread.join(); in TEST_F()
330 auto thread = std::thread(&MessageLoopThread::StartUp, &message_loop_thread); in TEST_F() local
331 thread.join(); in TEST_F()
341 base::BindOnce([](MessageLoopThread* thread, in TEST_F()
[all …]
/packages/modules/Connectivity/thread/tests/cts/src/android/net/thread/cts/
DThreadNetworkExceptionTest.java17 package android.net.thread.cts;
19 import static android.net.thread.ThreadNetworkException.ERROR_INTERNAL_ERROR;
20 import static android.net.thread.ThreadNetworkException.ERROR_THREAD_DISABLED;
21 import static android.net.thread.ThreadNetworkException.ERROR_UNKNOWN;
27 import android.net.thread.ThreadNetworkException;
28 import android.net.thread.utils.ThreadFeatureCheckerRule;
29 import android.net.thread.utils.ThreadFeatureCheckerRule.RequiresThreadFeature;
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/mdns/
DMdnsProberTest.kt57 private val thread = HandlerThread(MdnsProberTest::class.simpleName) in <lambda>() constant
69 thread.start() in <lambda>()
74 thread.quitSafely() in <lambda>()
75 thread.join() in <lambda>()
124 thread.looper, socket, buffer, sharedLog, true /* enableDebugLog */, flags) in <lambda>()
125 val prober = TestProber(thread.looper, replySender, cb, sharedLog) in <lambda>()
149 thread.looper, socket, buffer, sharedLog, true /* enableDebugLog */, flags) in <lambda>()
150 val prober = TestProber(thread.looper, replySender, cb, sharedLog) in <lambda>()
188 thread.looper, socket, buffer, sharedLog, true /* enableDebugLog */, flags) in <lambda>()
189 val prober = TestProber(thread.looper, replySender, cb, sharedLog) in <lambda>()
[all …]
DMdnsRecordRepositoryTest.kt142 private val thread = HandlerThread(MdnsRecordRepositoryTest::class.simpleName) constant in com.android.server.connectivity.mdns.MdnsRecordRepositoryTest
163 thread.start() in setUp()
168 thread.quitSafely() in tearDown()
169 thread.join() in tearDown()
184 val repository = MdnsRecordRepository(thread.looper, deps, TEST_HOSTNAME, makeFlags()) in makeFlags()
219 val repository = MdnsRecordRepository(thread.looper, deps, TEST_HOSTNAME, makeFlags()) in testAddAndConflicts()
231 val repository = MdnsRecordRepository(thread.looper, deps, TEST_HOSTNAME, makeFlags()) in testAddAndUpdates()
265 val repository = MdnsRecordRepository(thread.looper, deps, TEST_HOSTNAME, makeFlags()) in testInvalidReuseOfServiceId()
274 val repository = MdnsRecordRepository(thread.looper, deps, TEST_HOSTNAME, makeFlags()) in testHasActiveService()
291 val repository = MdnsRecordRepository(thread.looper, deps, TEST_HOSTNAME, makeFlags()) in testExitAnnouncements()
[all …]

12345678910>>...20