aboutsummaryrefslogtreecommitdiff
path: root/support/xpthread_attr_setaffinity_np.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-05-21 15:09:43 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-05-27 13:12:07 -0300
commitd85ad0e58a068623a09a4a3463dce3bf411c8cb4 (patch)
tree0a27f6572674993ca9a06037d723550112082c31 /support/xpthread_attr_setaffinity_np.c
parent42813c675dea94d3d082640ee933ce7f59d4979f (diff)
downloadglibc-d85ad0e58a068623a09a4a3463dce3bf411c8cb4.zip
glibc-d85ad0e58a068623a09a4a3463dce3bf411c8cb4.tar.gz
glibc-d85ad0e58a068623a09a4a3463dce3bf411c8cb4.tar.bz2
support: Add xpthread_attr_setaffinity_np wrapper
Diffstat (limited to 'support/xpthread_attr_setaffinity_np.c')
-rw-r--r--support/xpthread_attr_setaffinity_np.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/support/xpthread_attr_setaffinity_np.c b/support/xpthread_attr_setaffinity_np.c
new file mode 100644
index 0000000..5bb5b41
--- /dev/null
+++ b/support/xpthread_attr_setaffinity_np.c
@@ -0,0 +1,28 @@
+/* pthread_attr_setaffinity_np with error checking.
+ 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/>. */
+
+#include <support/xthread.h>
+
+void
+xpthread_attr_setaffinity_np (pthread_attr_t *attr,
+ size_t cpusetsize, const cpu_set_t *cpuset)
+{
+ xpthread_check_return ("pthread_attr_setaffinity_np",
+ pthread_attr_setaffinity_np (attr, cpusetsize,
+ cpuset));
+}