summaryrefslogtreecommitdiff
path: root/lib/spawnattr_getschedparam.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2008-09-28 13:59:47 +0200
committerBruno Haible <bruno@clisp.org>2008-09-28 13:59:47 +0200
commit4dd331b3cfe0c7d24ceb3ec66fe256dd1b502229 (patch)
tree9520ae06371da92819bcb5a89663af399acd0830 /lib/spawnattr_getschedparam.c
parentc723de14113002c024294c878763846ea95aa3b4 (diff)
downloadgnulib-4dd331b3cfe0c7d24ceb3ec66fe256dd1b502229.tar.gz
New module 'posix_spawnattr_getschedparam'.
Diffstat (limited to 'lib/spawnattr_getschedparam.c')
-rw-r--r--lib/spawnattr_getschedparam.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/spawnattr_getschedparam.c b/lib/spawnattr_getschedparam.c
new file mode 100644
index 0000000000..22664e25ff
--- /dev/null
+++ b/lib/spawnattr_getschedparam.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 2000, 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <spawn.h>
+
+/* Get scheduling parameters from the attribute structure. */
+int
+posix_spawnattr_getschedparam (const posix_spawnattr_t *attr,
+ struct sched_param *schedparam)
+{
+ /* Copy the scheduling parameters. */
+ *schedparam = attr->_sp;
+
+ return 0;
+}