summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-07-18 23:28:06 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-07-17 22:33:54 +0000
commit7dd126a38ca501818b07927f310dcc0f531c0f1f (patch)
treeb9defb3829557ad1d794a0f4e919e5559ec35b2a
parent3c2b71ad5612721c7073a4396cdad2c00e86ba54 (diff)
parent9c07aee83b4ebbf2dba8e23d6896683187b9724e (diff)
downloadbionic-7dd126a38ca501818b07927f310dcc0f531c0f1f.zip
bionic-7dd126a38ca501818b07927f310dcc0f531c0f1f.tar.gz
bionic-7dd126a38ca501818b07927f310dcc0f531c0f1f.tar.bz2
Merge "Clean up some misinformation around prctl."
-rw-r--r--libc/SYSCALLS.TXT4
-rw-r--r--libc/include/sys/prctl.h10
-rw-r--r--libc/include/unistd.h3
3 files changed, 4 insertions, 13 deletions
diff --git a/libc/SYSCALLS.TXT b/libc/SYSCALLS.TXT
index 7ae054e..014d554 100644
--- a/libc/SYSCALLS.TXT
+++ b/libc/SYSCALLS.TXT
@@ -80,9 +80,7 @@ int setpgid(pid_t, pid_t) all
int setregid:setregid32(gid_t, gid_t) arm,x86
int setregid:setregid(gid_t, gid_t) arm64,mips,mips64,x86_64
int chroot(const char*) all
-# IMPORTANT: Even though <sys/prctl.h> declares prctl(int, ...), the syscall stub must take 6 arguments
-# to match the kernel implementation.
-int prctl(int option, unsigned int arg2, unsigned int arg3, unsigned int arg4, unsigned int arg5) all
+int prctl(int, unsigned long, unsigned long, unsigned long, unsigned long) all
long __arch_prctl:arch_prctl(int, unsigned long) x86_64
int capget(cap_user_header_t header, cap_user_data_t data) all
int capset(cap_user_header_t header, const cap_user_data_t data) all
diff --git a/libc/include/sys/prctl.h b/libc/include/sys/prctl.h
index 8c61677..d96b8b6 100644
--- a/libc/include/sys/prctl.h
+++ b/libc/include/sys/prctl.h
@@ -25,20 +25,16 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
#ifndef _SYS_PRCTL_H
#define _SYS_PRCTL_H
-#include <linux/prctl.h>
#include <sys/cdefs.h>
+#include <linux/prctl.h>
+
__BEGIN_DECLS
-/* IMPORTANT NOTE: This function is declared as taking a variable number
- * of arguments to match the GLibc definition. However
- * its declaration inside SYSCALLS.TXT *must* make it
- * take 6 arguments to ensure consistency with the kernel
- * implementation.
- */
extern int prctl(int option, ...);
__END_DECLS
diff --git a/libc/include/unistd.h b/libc/include/unistd.h
index afe5f1a..12e6257 100644
--- a/libc/include/unistd.h
+++ b/libc/include/unistd.h
@@ -71,9 +71,6 @@ extern int execl(const char *, const char *, ...);
extern int execlp(const char *, const char *, ...);
extern int execle(const char *, const char *, ...);
-/* IMPORTANT: See comment under <sys/prctl.h> about this declaration */
-extern int prctl(int option, ...);
-
extern int nice(int);
extern int setuid(uid_t);