summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/setns.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/setns.c')
-rw-r--r--tools/perf/util/setns.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/setns.c b/tools/perf/util/setns.c
new file mode 100644
index 000000000..ce8fc290f
--- /dev/null
+++ b/tools/perf/util/setns.c
@@ -0,0 +1,8 @@
+#include "util.h"
+#include <unistd.h>
+#include <sys/syscall.h>
+
+int setns(int fd, int nstype)
+{
+ return syscall(__NR_setns, fd, nstype);
+}