Home
last modified time | relevance | path

Searched refs:Os (Results 1 – 16 of 16) sorted by relevance

/system/connectivity/wifilogd/
Dos.cpp36 constexpr int Os::kInvalidFd;
38 Os::Os() : raw_os_(new RawOs()) {} in Os() function in android::wifilogd::Os
39 Os::Os(std::unique_ptr<RawOs> raw_os) : raw_os_(std::move(raw_os)) {} in Os() function in android::wifilogd::Os
40 Os::~Os() {} in ~Os()
42 std::tuple<int, Os::Errno> Os::GetControlSocket( in GetControlSocket()
52 Os::Timestamp Os::GetTimestamp(clockid_t clock_id) const { in GetTimestamp()
73 void Os::Nanosleep(uint32_t sleep_time_nsec) { in Nanosleep()
93 std::tuple<size_t, Os::Errno> Os::ReceiveDatagram(int fd, void* buf, in ReceiveDatagram()
112 std::tuple<size_t, Os::Errno> Os::Write(int fd, const void* buf, in Write()
Dmain_loop.cpp38 : MainLoop(socket_name, std::make_unique<Os>(), in MainLoop()
41 MainLoop::MainLoop(const std::string& socket_name, std::unique_ptr<Os> os, in MainLoop()
44 Os::Errno err; in MainLoop()
54 Os::Errno err; in RunOnce()
68 Os::kInvalidFd); in RunOnce()
73 void MainLoop::ProcessError(Os::Errno err) { in ProcessError()
Dos.h42 class Os {
55 Os();
59 explicit Os(std::unique_ptr<RawOs> raw_os);
61 virtual ~Os();
102 DISALLOW_COPY_AND_ASSIGN(Os);
Dmain_loop.h35 MainLoop(const std::string& socket_name, std::unique_ptr<Os> os,
42 void ProcessError(Os::Errno err);
44 std::unique_ptr<Os> os_;
Dcommand_processor.cpp48 TimestampHeader& set_since_boot_awake_only(Os::Timestamp new_value) { in set_since_boot_awake_only()
53 TimestampHeader& set_since_boot_with_sleep(Os::Timestamp new_value) { in set_since_boot_with_sleep()
58 TimestampHeader& set_since_epoch(Os::Timestamp new_value) { in set_since_epoch()
79 Os::Timestamp since_boot_awake_only;
80 Os::Timestamp since_boot_with_sleep;
81 Os::Timestamp since_epoch; // non-monotonic
125 : current_log_buffer_(buffer_size_bytes), os_(new Os()) {} in CommandProcessor()
128 std::unique_ptr<Os> os) in CommandProcessor()
236 Os::Errno err; in Dump()
Dcommand_processor.h42 CommandProcessor(size_t buffer_size_bytes, std::unique_ptr<Os> os);
86 const std::unique_ptr<Os> os_;
/system/connectivity/wifilogd/tests/
Dos_unittest.cpp61 os_ = std::unique_ptr<Os>(new Os(std::unique_ptr<RawOs>(raw_os_))); in OsTest()
65 std::unique_ptr<Os> os_;
102 constexpr std::tuple<int, Os::Errno> kExpectedResult{kFakeValidFd, 0}; in TEST_F()
108 constexpr Os::Errno kError = EINVAL; in TEST_F()
112 constexpr std::tuple<int, Os::Errno> kExpectedResult{Os::kInvalidFd, kError}; in TEST_F()
123 const Os::Timestamp received = os_->GetTimestamp(CLOCK_REALTIME); in TEST_F()
137 Nanosleep(Pointee(EqualsTimespec({0, Os::kMaxNanos})), _)); in TEST_F()
138 os_->Nanosleep(Os::kMaxNanos); in TEST_F()
148 Nanosleep(Pointee(EqualsTimespec({0, Os::kMaxNanos})), _)); in TEST_F()
149 os_->Nanosleep(Os::kMaxNanos + 1); in TEST_F()
[all …]
Dmain_loop_unittest.cpp50 .WillOnce(Return(std::tuple<size_t, Os::Errno>{kControlSocketFd, 0})); in MainLoopTest()
52 kFakeSocketName, std::unique_ptr<Os>{os_}, in MainLoopTest()
81 Return(std::tuple<size_t, Os::Errno>{sizeof(protocol::Command), 0})); in TEST_F()
90 Return(std::tuple<size_t, Os::Errno>{protocol::kMaxMessageSize, 0})); in TEST_F()
98 .WillOnce(Return(std::tuple<size_t, Os::Errno>{0, 0})); in TEST_F()
106 std::tuple<size_t, Os::Errno>{protocol::kMaxMessageSize + 1, 0})); in TEST_F()
114 .WillOnce(Return(std::tuple<size_t, Os::Errno>{0, EINTR})); in TEST_F()
129 .WillByDefault(Return(std::tuple<size_t, Os::Errno>{-1, ERANGE})); in TEST_F()
137 .WillByDefault(Return(std::tuple<size_t, Os::Errno>{0, EFAULT})); in TEST_F()
Dmock_os.h31 class MockOs : public Os {
42 MOCK_METHOD3(Write, std::tuple<size_t, Os::Errno>(int fd, const void* buf,
Dcommand_processor_unittest.cpp75 return std::tuple<size_t, Os::Errno>(buflen, 0); in CommandProcessorTest()
78 new CommandProcessor(kBufferSizeBytes, std::unique_ptr<Os>(os_))); in CommandProcessorTest()
138 Os::kInvalidFd); in SendAsciiMessageWithAdjustments()
175 command_buffer.data(), sizeof(protocol::Command) - 1, Os::kInvalidFd)); in TEST_F()
248 .WillOnce(Return(Os::Timestamp{0, 999})); in TEST_F()
250 .WillOnce(Return(Os::Timestamp{1, 1000})); in TEST_F()
252 .WillOnce(Return(Os::Timestamp{123456, 123456000})); in TEST_F()
254 command_buf.data(), command_buf.size(), Os::kInvalidFd)); in TEST_F()
393 .WillOnce(Return(std::tuple<size_t, Os::Errno>{-1, EBADF})); in TEST_F()
408 return std::tuple<size_t, Os::Errno>{buflen / 2, EINTR}; in TEST_F()
[all …]
/system/extras/simpleperf/app_api/java/com/android/simpleperf/
DRecordOptions.java19 import android.system.Os;
148 args.add(String.valueOf(Os.getpid())); in toRecordArgs()
/system/timezone/distro/core/src/test/com/android/timezone/distro/
DFileUtilsTest.java20 import android.system.Os;
305 Os.symlink(file.getAbsolutePath(), symlink.getAbsolutePath()); in createSymlink()
336 StructStat sb = Os.stat(path); in assertDirExistsAndIsAccessible()
/system/extras/simpleperf/doc/
Dandroid_platform_profiling.md60 Os.prctl(OsConstants.PR_CAP_AMBIENT, OsConstants.PR_CAP_AMBIENT_RAISE,
/system/core/debuggerd/
DAndroid.bp10 "-Os",
/system/chre/build/sys_support/qcom/
Dchre.scons85 env.Replace(HEXAGONCC_OPT = ' -Os ')
/system/tools/hidl/test/java_test/src/com/android/commands/hidl_test_java/
DHidlTestJava.java50 import android.system.Os;