Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fac6444 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 10620181 from e6344c1d to mainline-art-release

Change-Id: I34ec88e353ac2b295d5a8326afde28c6ae7b4dd1
parents 6ed11a98 e6344c1d
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -229,7 +229,6 @@ cc_library {
        "libmodules-utils-build",
        "libprotobuf-cpp-lite",
        "libstatslog_resolv",
        "libstatspush_compat",
        "libsysutils",
        "netd_event_listener_interface-lateststable-ndk",
        "server_configurable_flags",
@@ -316,10 +315,9 @@ cc_library_static {
    export_generated_headers: ["statslog_resolv.h"],
    static_libs: [
        "libcutils",
        "libstatspush_compat",
    ],
    header_libs: [
        "libgtest_prod_headers", // Used by libstatspush_compat
    shared_libs: [
        "libstatssocket",
    ],
    apex_available: ["com.android.resolv"],
    min_sdk_version: "30",
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <netinet/in.h>
#include <condition_variable>
#include <cstdlib>
#include <functional>
#include <mutex>
#include <unordered_map>

+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#pragma once

#include <climits>
#include <functional>
#include <map>
#include <mutex>
#include <string>
+1 −1
Original line number Diff line number Diff line
set noparent
file:platform/packages/modules/Connectivity:master:/OWNERS_core_networking
file:platform/packages/modules/Connectivity:main:/OWNERS_core_networking
+6 −10
Original line number Diff line number Diff line
@@ -57,8 +57,7 @@ impl BootTime {
    /// Gets a `BootTime` representing the current moment in time.
    pub fn now() -> BootTime {
        let mut t = libc::timespec { tv_sec: 0, tv_nsec: 0 };
        // # Safety
        // clock_gettime's only action will be to possibly write to the pointer provided,
        // SAFETY: clock_gettime's only action will be to possibly write to the pointer provided,
        // and no borrows exist from that object other than the &mut used to construct the pointer
        // itself.
        if unsafe { libc::clock_gettime(libc::CLOCK_BOOTTIME, &mut t as *mut libc::timespec) } != 0
@@ -93,9 +92,8 @@ struct TimerFd(RawFd);

impl Drop for TimerFd {
    fn drop(&mut self) {
        // # Safety
        // The fd is owned by the TimerFd struct, and no memory access occurs as a result of this
        // call.
        // SAFETY: The fd is owned by the TimerFd struct, and no memory access occurs as a result of
        // this call.
        unsafe {
            libc::close(self.0);
        }
@@ -110,9 +108,8 @@ impl AsRawFd for TimerFd {

impl TimerFd {
    fn create() -> io::Result<Self> {
        // # Unsafe
        // This libc call will either give us back a file descriptor or fail, it does not act on
        // memory or resources.
        // SAFETY: This libc call will either give us back a file descriptor or fail, it does not
        // act on memory or resources.
        let raw = unsafe {
            libc::timerfd_create(libc::CLOCK_BOOTTIME, libc::TFD_NONBLOCK | libc::TFD_CLOEXEC)
        };
@@ -131,8 +128,7 @@ impl TimerFd {
                tv_nsec: duration.subsec_nanos().try_into().unwrap(),
            },
        };
        // # Unsafe
        // We own `timer` and there are no borrows to it other than the pointer we pass to
        // SAFETY: We own `timer` and there are no borrows to it other than the pointer we pass to
        // timerfd_settime. timerfd_settime is explicitly documented to handle a null output
        // parameter for its fourth argument by not filling out the output. The fd passed in at
        // self.0 is owned by the `TimerFd` struct, so we aren't breaking anyone else's invariants.
Loading