Home
last modified time | relevance | path

Searched refs:loop (Results 1 – 25 of 37) sorted by relevance

12

/system/extras/simpleperf/
DIOEventLoop_test.cpp28 IOEventLoop loop; in TEST() local
31 ASSERT_NE(nullptr, loop.AddReadEvent(fd[0], [&]() { in TEST()
37 return loop.ExitLoop(); in TEST()
55 ASSERT_TRUE(loop.RunLoop()); in TEST()
67 IOEventLoop loop; in TEST() local
69 ASSERT_NE(nullptr, loop.AddWriteEvent(fd[1], [&]() { in TEST()
76 loop.ExitLoop(); in TEST()
92 ASSERT_TRUE(loop.RunLoop()); in TEST()
101 IOEventLoop loop; in TEST() local
103 ASSERT_TRUE(loop.AddSignalEvent(SIGINT, [&]() { in TEST()
[all …]
Dworkload_test.cpp26 IOEventLoop loop; in TEST() local
27 ASSERT_TRUE(loop.AddSignalEvent(SIGCHLD, [&]() { in TEST()
28 return loop.ExitLoop(); in TEST()
34 ASSERT_TRUE(loop.RunLoop()); in TEST()
45 IOEventLoop loop; in run_signaled_workload() local
46 ASSERT_TRUE(loop.AddSignalEvent(SIGCHLD, [&]() { in run_signaled_workload()
47 return loop.ExitLoop(); in run_signaled_workload()
53 ASSERT_TRUE(loop.RunLoop()); in run_signaled_workload()
66 IOEventLoop loop; in run_exit_nonzero_workload() local
67 ASSERT_TRUE(loop.AddSignalEvent(SIGCHLD, [&]() { in run_exit_nonzero_workload()
[all …]
DUnixSocket_test.cpp83 IOEventLoop loop; in ClientToTestUndelayedMessage() local
95 auto close_connection_callback = [&]() { return loop.ExitLoop(); }; in ClientToTestUndelayedMessage()
96 ASSERT_TRUE(client->PrepareForIO(loop, receive_message_callback, in ClientToTestUndelayedMessage()
98 ASSERT_TRUE(loop.RunLoop()); in ClientToTestUndelayedMessage()
112 IOEventLoop loop; in TEST() local
129 auto close_connection_callback = [&]() { return loop.ExitLoop(); }; in TEST()
130 ASSERT_TRUE(conn->PrepareForIO(loop, receive_message_callback, in TEST()
136 ASSERT_TRUE(loop.RunLoop()); in TEST()
146 IOEventLoop loop; in ClientToTestBufferedMessage() local
154 auto close_connection_callback = [&]() { return loop.ExitLoop(); }; in ClientToTestBufferedMessage()
[all …]
DIOEventLoop.cpp25 IOEventLoop* loop; member
30 IOEvent(IOEventLoop* loop, const std::function<bool()>& callback) in IOEvent()
31 : loop(loop), e(nullptr), callback(callback), enabled(false) {} in IOEvent()
63 e->loop->has_error_ = true; in EventCallbackFn()
64 e->loop->ExitLoop(); in EventCallbackFn()
176 IOEventLoop* loop = ref->loop; in DelEvent() local
177 for (auto it = loop->events_.begin(); it != loop->events_.end(); ++it) { in DelEvent()
179 loop->events_.erase(it); in DelEvent()
DInplaceSamplerClient.cpp70 bool InplaceSamplerClient::StartPolling(IOEventLoop& loop, in StartPolling() argument
78 if (!conn_->PrepareForIO(loop, read_callback, close_callback)) { in StartPolling()
95 return loop.AddPeriodicEvent(tv, check_reply_callback); in StartPolling()
125 bool InplaceSamplerClient::StopProfiling(IOEventLoop& loop, in StopProfiling() argument
130 if (!conn_->PrepareForIO(loop, read_callback, close_callback)) { in StopProfiling()
DInplaceSamplerClient.h36 bool StartPolling(IOEventLoop& loop, const std::function<bool(Record*)>& record_callback,
38 bool StopProfiling(IOEventLoop& loop, const std::function<bool()>& close_callback);
DUnixSocket.cpp106 IOEventLoop& loop, const std::function<bool(const UnixSocketMessage&)>& in PrepareForIO() argument
111 read_event_ = loop.AddReadEvent(fd_, [&]() { return ReadData(); }); in PrepareForIO()
116 write_event_ = loop.AddWriteEvent(fd_, [&]() { return WriteData(); }); in PrepareForIO()
Dcmd_stat.cpp429 IOEventLoop* loop = event_selection_set_.GetIOEventLoop(); in Run() local
430 if (!loop->AddSignalEvents({SIGCHLD, SIGINT, SIGTERM, SIGHUP}, in Run()
431 [&]() { return loop->ExitLoop(); })) { in Run()
435 if (!loop->AddPeriodicEvent(SecondToTimeval(duration_in_sec_), in Run()
436 [&]() { return loop->ExitLoop(); })) { in Run()
456 if (!loop->AddPeriodicEvent(SecondToTimeval(interval_in_ms_ / 1000.0), in Run()
467 if (!loop->RunLoop()) { in Run()
Denvironment.cpp622 IOEventLoop loop; in RunInAppContext() local
624 if (!loop.AddSignalEvents({SIGINT, SIGTERM, SIGHUP}, in RunInAppContext()
625 [&]() { need_to_kill_child = true; return loop.ExitLoop(); })) { in RunInAppContext()
628 if (!loop.AddSignalEvent(SIGCHLD, [&]() { return loop.ExitLoop(); })) { in RunInAppContext()
636 if (!loop.RunLoop()) { in RunInAppContext()
Devent_fd.h82 bool StartPolling(IOEventLoop& loop, const std::function<bool()>& callback);
Devent_fd.cpp271 bool EventFd::StartPolling(IOEventLoop& loop, in StartPolling() argument
273 ioevent_ref_ = loop.AddReadEvent(perf_event_fd_, callback); in StartPolling()
Dcmd_record.cpp341 IOEventLoop* loop = event_selection_set_.GetIOEventLoop(); in Run() local
342 if (!loop->AddSignalEvents({SIGCHLD, SIGINT, SIGTERM, SIGHUP}, in Run()
343 [&]() { return loop->ExitLoop(); })) { in Run()
347 if (!loop->AddPeriodicEvent(SecondToTimeval(duration_in_sec_), in Run()
348 [&]() { return loop->ExitLoop(); })) { in Run()
367 if (!loop->RunLoop()) { in Run()
/system/extras/simpleperf/runtest/
Dfunction_indirect_recursive.cpp3 void FunctionRecursiveTwo(int loop);
5 void FunctionRecursiveOne(int loop) { in FunctionRecursiveOne() argument
8 if (loop >= 0) { in FunctionRecursiveOne()
9 FunctionRecursiveTwo(loop); in FunctionRecursiveOne()
13 void FunctionRecursiveTwo(int loop) { in FunctionRecursiveTwo() argument
16 if (loop > 0) { in FunctionRecursiveTwo()
17 FunctionRecursiveOne(loop - 1); in FunctionRecursiveTwo()
Dfunction_recursive.cpp3 void FunctionRecursive(int loop) { in FunctionRecursive() argument
6 if (loop > 0) { in FunctionRecursive()
7 FunctionRecursive(loop - 1); in FunctionRecursive()
/system/update_engine/payload_consumer/
Dpostinstall_runner_action_unittest.cc245 ScopedLoopbackDeviceBinder loop(postinstall_image_, false, nullptr); in TEST_F() local
246 RunPosinstallAction(loop.dev(), kPostinstallDefaultScript, false); in TEST_F()
255 ScopedLoopbackDeviceBinder loop(postinstall_image_, false, nullptr); in TEST_F() local
256 RunPosinstallAction(loop.dev(), "bin/postinst_link", false); in TEST_F()
261 ScopedLoopbackDeviceBinder loop(postinstall_image_, false, nullptr); in TEST_F() local
263 RunPosinstallAction(loop.dev(), "bin/postinst_example", true); in TEST_F()
284 ScopedLoopbackDeviceBinder loop(postinstall_image_, false, nullptr); in TEST_F() local
285 RunPosinstallAction(loop.dev(), "bin/postinst_fail1", false); in TEST_F()
292 ScopedLoopbackDeviceBinder loop(postinstall_image_, false, nullptr); in TEST_F() local
293 RunPosinstallAction(loop.dev(), "bin/postinst_fail3", false); in TEST_F()
[all …]
Ddownload_action_unittest.cc131 brillo::FakeMessageLoop loop(nullptr); in TestWithData() local
132 loop.SetAsCurrent(); in TestWithData()
191 loop.PostTask(FROM_HERE, in TestWithData()
193 loop.Run(); in TestWithData()
194 EXPECT_FALSE(loop.PendingTasks()); in TestWithData()
260 brillo::FakeMessageLoop loop(nullptr); in TestTerminateEarly() local
261 loop.SetAsCurrent(); in TestTerminateEarly()
298 loop.PostTask(FROM_HERE, in TestTerminateEarly()
300 loop.Run(); in TestTerminateEarly()
301 EXPECT_FALSE(loop.PendingTasks()); in TestTerminateEarly()
[all …]
/system/core/libappfuse/
DFuseAppLoop.cc32 bool HandleLookUp(FuseAppLoop* loop, FuseBuffer* buffer, FuseAppLoopCallback* callback) { in HandleLookUp() argument
37 return loop->ReplySimple(buffer->request.header.unique, -ENOENT); in HandleLookUp()
44 return loop->ReplySimple(buffer->request.header.unique, -ENOENT); in HandleLookUp()
50 return loop->ReplySimple(buffer->request.header.unique, -ENOENT); in HandleLookUp()
57 bool HandleGetAttr(FuseAppLoop* loop, FuseBuffer* buffer, FuseAppLoopCallback* callback) { in HandleGetAttr() argument
59 return loop->ReplyGetAttr(buffer->request.header.unique, buffer->request.header.nodeid, 0, in HandleGetAttr()
67 bool HandleRead(FuseAppLoop* loop, FuseBuffer* buffer, FuseAppLoopCallback* callback) { in HandleRead() argument
69 return loop->ReplySimple(buffer->request.header.unique, -EINVAL); in HandleRead()
77 bool HandleWrite(FuseAppLoop* loop, FuseBuffer* buffer, FuseAppLoopCallback* callback) { in HandleWrite() argument
79 return loop->ReplySimple(buffer->request.header.unique, -EINVAL); in HandleWrite()
[all …]
/system/core/libpixelflinger/codeflinger/
Ddisassem.c577 int loop; in disasm_print_reglist() local
585 for (loop = 0; loop < 17; ++loop) { in disasm_print_reglist()
587 if (loop == 16 || !(insn & (1 << loop))) { in disasm_print_reglist()
592 if (start == loop - 1) in disasm_print_reglist()
595 di->di_printf("r%d-r%d", start, loop - 1); in disasm_print_reglist()
599 if (insn & (1 << loop)) in disasm_print_reglist()
600 start = loop; in disasm_print_reglist()
/system/core/libappfuse/tests/
DFuseAppLoopTest.cc43 FuseAppLoop* loop; member in android::fuse::__anon70b134a80111::Callback
47 EXPECT_TRUE(loop->ReplyGetAttr(seq, inode, kTestFileSize, S_IFREG | 0777)); in OnGetAttr()
52 EXPECT_TRUE(loop->ReplyLookup(unique, inode, kTestFileSize)); in OnLookup()
57 loop->ReplySimple(seq, 0); in OnFsync()
63 loop->ReplyWrite(seq, 0); in OnWrite()
69 loop->ReplySimple(seq, 0); in OnRead()
74 loop->ReplyOpen(seq, inode); in OnOpen()
79 loop->ReplySimple(seq, 0); in OnRelease()
96 callback_.loop = loop_.get(); in SetUp()
DFuseBridgeLoopTest.cc58 FuseBridgeLoop loop; in SetUp() local
59 loop.AddBridge(1, std::move(dev_sockets_[1]), std::move(proxy_sockets_[0])); in SetUp()
60 loop.Start(&callback_); in SetUp()
/system/update_engine/
Dsideload_main.cc145 brillo::BaseMessageLoop loop; in ApplyUpdatePayload() local
146 loop.SetAsCurrent(); in ApplyUpdatePayload()
181 loop.Run(); in ApplyUpdatePayload()
Domaha_request_action_unittest.cc363 brillo::FakeMessageLoop loop(nullptr); in TestUpdateCheck() local
364 loop.SetAsCurrent(); in TestUpdateCheck()
406 loop.PostTask(base::Bind( in TestUpdateCheck()
409 loop.Run(); in TestUpdateCheck()
410 EXPECT_FALSE(loop.PendingTasks()); in TestUpdateCheck()
425 brillo::FakeMessageLoop loop(nullptr); in TestEvent() local
426 loop.SetAsCurrent(); in TestEvent()
441 loop.PostTask(base::Bind( in TestEvent()
444 loop.Run(); in TestEvent()
445 EXPECT_FALSE(loop.PendingTasks()); in TestEvent()
[all …]
/system/core/init/
Dbuiltins.cpp332 int mode, loop, fd; in do_mount() local
343 loop = open(tmp, mode | O_CLOEXEC); in do_mount()
344 if (loop < 0) { in do_mount()
350 if (ioctl(loop, LOOP_GET_STATUS, &info) < 0 && errno == ENXIO) { in do_mount()
352 if (ioctl(loop, LOOP_SET_FD, fd) >= 0) { in do_mount()
356 ioctl(loop, LOOP_CLR_FD, 0); in do_mount()
357 close(loop); in do_mount()
361 close(loop); in do_mount()
366 close(loop); in do_mount()
/system/core/storaged/
DREADME.properties2 ro.storaged.event.perf_check # check for time spent in event loop, in microseconds
/system/libufdt/sysdeps/
Dlibufdt_sysdeps_vendor.c103 loop: in qsort()
167 goto loop; in qsort()

12