aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-05-28 00:53:13 -0400
committerUlrich Drepper <drepper@gmail.com>2011-05-28 00:53:13 -0400
commitce67228d570d2df88d74184e5e3618a5b2ef8704 (patch)
tree82e88214561e72a7a8d5b6db6820ea2191db461b /sysdeps/unix
parenta8509ca540427502bd955f35296ff7b727c7a8a1 (diff)
downloadglibc-ce67228d570d2df88d74184e5e3618a5b2ef8704.tar
glibc-ce67228d570d2df88d74184e5e3618a5b2ef8704.tar.gz
glibc-ce67228d570d2df88d74184e5e3618a5b2ef8704.tar.bz2
glibc-ce67228d570d2df88d74184e5e3618a5b2ef8704.zip
Set setns system call
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/Versions2
-rw-r--r--sysdeps/unix/sysv/linux/bits/sched.h10
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list2
3 files changed, 11 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions
index 29099dc5c0..984bc4faf4 100644
--- a/sysdeps/unix/sysv/linux/Versions
+++ b/sysdeps/unix/sysv/linux/Versions
@@ -158,6 +158,8 @@ libc {
clock_adjtime;
name_to_handle_at; open_by_handle_at;
+
+ setns;
}
GLIBC_PRIVATE {
# functions used in other libraries
diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h
index 8ba9eed6f0..b222fb2115 100644
--- a/sysdeps/unix/sysv/linux/bits/sched.h
+++ b/sysdeps/unix/sysv/linux/bits/sched.h
@@ -1,6 +1,6 @@
/* Definitions of constants and data structure for POSIX 1003.1b-1993
scheduling interface.
- Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008,2009
+ Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008,2009,2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -37,7 +37,7 @@
# define SCHED_RESET_ON_FORK 0x40000000
#endif
-#ifdef __USE_MISC
+#ifdef __USE_GNU
/* Cloning flags. */
# define CSIGNAL 0x000000ff /* Signal mask to be sent at exit. */
# define CLONE_VM 0x00000100 /* Set if VM shared between processes. */
@@ -78,7 +78,7 @@ struct sched_param
__BEGIN_DECLS
-#ifdef __USE_MISC
+#ifdef __USE_GNU
/* Clone current process. */
extern int clone (int (*__fn) (void *__arg), void *__child_stack,
int __flags, void *__arg, ...) __THROW;
@@ -88,8 +88,12 @@ extern int unshare (int __flags) __THROW;
/* Get index of currently used CPU. */
extern int sched_getcpu (void) __THROW;
+
+/* Switch process to namespace of type NSTYPE indicated by FD. */
+extern int setns (int __fd, int __nstype) __THROW;
#endif
+
__END_DECLS
#endif /* need schedparam */
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index 051303f07c..2bed9e99e6 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -107,3 +107,5 @@ fanotify_init EXTRA fanotify_init i:ii fanotify_init
name_to_handle_at EXTRA name_to_handle_at i:isppi name_to_handle_at
open_by_handle_at EXTRA open_by_handle_at Ci:ipi open_by_handle_at
+
+setns EXTRA setns i:ii setns