Merge "Fix prctl argument type"
am: 6cc5927e0d
Change-Id: Iee476e7734bde72bdaebf9d1643c4b3e60f2339e
This commit is contained in:
commit
316b7334b8
1 changed files with 2 additions and 2 deletions
|
@ -340,7 +340,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) {
|
||||
|
@ -348,7 +348,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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue