aboutsummaryrefslogtreecommitdiff
path: root/support/xsched.h
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-03-10 12:26:30 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-06-24 10:00:52 -0300
commitde8995a2a04163617c1a233b4b81356ef9f9741f (patch)
treecf7b222d36481bea05cb074db33be67decc28b70 /support/xsched.h
parente3e3eb0a2ea615c272cec5f47ba9f243ccdaf386 (diff)
downloadglibc-de8995a2a04163617c1a233b4b81356ef9f9741f.tar
glibc-de8995a2a04163617c1a233b4b81356ef9f9741f.tar.gz
glibc-de8995a2a04163617c1a233b4b81356ef9f9741f.tar.bz2
glibc-de8995a2a04163617c1a233b4b81356ef9f9741f.zip
support: Add xclone
It is a wrapper for Linux clone syscall, to simplify the call to the use only the most common arguments and remove architecture specific handling (such as ia64 different name and signature).
Diffstat (limited to 'support/xsched.h')
-rw-r--r--support/xsched.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/support/xsched.h b/support/xsched.h
new file mode 100644
index 0000000000..eefd731940
--- /dev/null
+++ b/support/xsched.h
@@ -0,0 +1,34 @@
+/* Wrapper for sched.h functions.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef SUPPORT_XSCHED_H
+#define SUPPORT_XSCHED_H
+
+__BEGIN_DECLS
+
+#include <sched.h>
+#include <sys/types.h>
+
+#ifdef __linux__
+pid_t xclone (int (*fn) (void *arg), void *arg, void *stack,
+ size_t stack_size, int flags);
+#endif
+
+__END_DECLS
+
+#endif