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

Commit 2daf8683 authored by Elliott Hughes's avatar Elliott Hughes Committed by android-build-merger
Browse files

Merge "Fix prctl argument type" am: 6cc5927e am: 316b7334

am: 184fa60c

Change-Id: Ibc96f273e17928f75148ab79c8a0aa1db166ba53
parents 5e4da519 184fa60c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -343,7 +343,7 @@ int set_cpuset_policy(int tid, SchedPolicy policy)
    return 0;
}

static void set_timerslack_ns(int tid, unsigned long long slack) {
static void set_timerslack_ns(int tid, unsigned long slack) {
    // v4.6+ kernels support the /proc/<tid>/timerslack_ns interface.
    // TODO: once we've backported this, log if the open(2) fails.
    if (__sys_supports_timerslack) {
@@ -351,7 +351,7 @@ static void set_timerslack_ns(int tid, unsigned long long slack) {
        snprintf(buf, sizeof(buf), "/proc/%d/timerslack_ns", tid);
        int fd = open(buf, O_WRONLY | O_CLOEXEC);
        if (fd != -1) {
            int len = snprintf(buf, sizeof(buf), "%llu", slack);
            int len = snprintf(buf, sizeof(buf), "%lu", slack);
            if (write(fd, buf, len) != len) {
                SLOGE("set_timerslack_ns write failed: %s\n", strerror(errno));
            }