about summary refs log tree commit diff
path: root/posix/sched_cpualloc.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-07-29 22:24:44 +0000
committerUlrich Drepper <drepper@redhat.com>2007-07-29 22:24:44 +0000
commit44f08a6ecc9d04fbb97475ebb99eaec26be36f90 (patch)
treedc7a2b43f2ac6b598e8c5095ae8622d1886246d7 /posix/sched_cpualloc.c
parenta14ad5ae4b0e9272877ad6e7cb97792632da94a8 (diff)
downloadglibc-44f08a6ecc9d04fbb97475ebb99eaec26be36f90.tar.gz
glibc-44f08a6ecc9d04fbb97475ebb99eaec26be36f90.tar.xz
glibc-44f08a6ecc9d04fbb97475ebb99eaec26be36f90.zip
* posix/Makefile (routines): Add sched_cpualloc and sched_cpufree.
	(tests): Add tst-cpuset.
	* posix/sched_cpualloc.c: New file.
	* posix/sched_cpufree.c: New file.
	* posix/tst-cpuset.c: New file.
	* posix/Versions: Export __sched_cpualloc and __sched_cpufree for
	GLIBC_2.7.
	* sysdeps/unix/sysv/linux/bits/sched.h: Define __CPU_*_S macros.
	* posix/sched.h: Define old CPU_* macros in temers of __CPU_*_S
	macros.  Define CPU_*_S macros.
Diffstat (limited to 'posix/sched_cpualloc.c')
-rw-r--r--posix/sched_cpualloc.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/posix/sched_cpualloc.c b/posix/sched_cpualloc.c
new file mode 100644
index 0000000000..2642a80109
--- /dev/null
+++ b/posix/sched_cpualloc.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 2007 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sched.h>
+#include <stdlib.h>
+
+
+cpu_set_t *
+__sched_cpualloc (size_t count)
+{
+  return malloc (CPU_ALLOC_SIZE (count));
+}