summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2021-04-07 02:16:26 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-04-07 02:16:26 +0000
commit99d11ebe83b38837990bb485247d80a5d8659f10 (patch)
tree9ae9b5f3445f5138a3c68576f79875ee00ea90b6 /libc
parent2b9719e3612149aa0a2124e135bc8ed2d5b911dd (diff)
parent39899f592bc1df6d5ed394f30b618117fa85dd8f (diff)
Merge "Fix return type of process_madvise()."
Diffstat (limited to 'libc')
-rw-r--r--libc/SYSCALLS.TXT2
-rw-r--r--libc/include/sys/mman.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/libc/SYSCALLS.TXT b/libc/SYSCALLS.TXT
index d2635089d..ec3482836 100644
--- a/libc/SYSCALLS.TXT
+++ b/libc/SYSCALLS.TXT
@@ -113,7 +113,7 @@ void* __mremap:mremap(void*, size_t, size_t, int, void*) all
int msync(const void*, size_t, int) all
int mprotect(const void*, size_t, int) all
int madvise(void*, size_t, int) all
-int process_madvise(int, const struct iovec*, size_t, int, unsigned int) all
+ssize_t process_madvise(int, const struct iovec*, size_t, int, unsigned int) all
int mlock(const void* addr, size_t len) all
int mlock2(const void* addr, size_t len, int flags) all
int munlock(const void* addr, size_t len) all
diff --git a/libc/include/sys/mman.h b/libc/include/sys/mman.h
index 3b44dab96..6ef0c1214 100644
--- a/libc/include/sys/mman.h
+++ b/libc/include/sys/mman.h
@@ -167,9 +167,9 @@ int madvise(void* __addr, size_t __size, int __advice);
* works just like madvise(2) but applies to the process specified by the given
* PID file descriptor.
*
- * Returns 0 on success, and returns -1 and sets `errno` on failure.
+ * Returns the number of bytes advised on success, and returns -1 and sets `errno` on failure.
*/
-int process_madvise(int __pid_fd, const struct iovec* __iov, size_t __count, int __advice, unsigned int __flags);
+ssize_t process_madvise(int __pid_fd, const struct iovec* __iov, size_t __count, int __advice, unsigned __flags);
#if defined(__USE_GNU)