linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Simon Derr <Simon.Derr@bull.net>
Cc: linux-kernel@vger.kernel.org
Subject: (3/4) [PATCH] cpuset - build without CPUSET configured
Date: Tue, 21 Oct 2003 16:20:32 -0700	[thread overview]
Message-ID: <20031021162032.723c247b.shemminger@osdl.org> (raw)
In-Reply-To: <Pine.A41.4.53.0310131503500.173334@isabelle.frec.bull.fr>

The existing patch would not build a kernel unless CPUSET was enabled.
The following is a simple way to make those system calls conditional.

diff -Nru a/include/linux/cpuset.h b/include/linux/cpuset.h
--- a/include/linux/cpuset.h	Tue Oct 21 16:09:32 2003
+++ b/include/linux/cpuset.h	Tue Oct 21 16:09:32 2003
@@ -24,6 +24,13 @@
 
 int cpuset_realtologic_cpuid(struct cpuset * cs, int cpuid);
 
+extern asmlinkage long sys_cpuset_create(cpuset_t *cpusetp, int flags);
+extern asmlinkage long sys_cpuset_destroy(cpuset_t cpuset);
+extern asmlinkage long sys_cpuset_attach(cpuset_t cpuset, pid_t pid);
+extern asmlinkage long sys_cpuset_alloc(cpuset_t cpuset, int len, 
+					unsigned long *user_mask_ptr);
+extern asmlinkage long sys_cpuset_getfreecpus(int flags, int len, 
+					      unsigned long *user_mask_ptr);
 #endif /* __KERNEL__ */
 
 #endif /* _LINUX_CPUSET_H */
diff -Nru a/kernel/sys.c b/kernel/sys.c
--- a/kernel/sys.c	Tue Oct 21 16:09:32 2003
+++ b/kernel/sys.c	Tue Oct 21 16:09:32 2003
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/highuid.h>
 #include <linux/fs.h>
+#include <linux/cpuset.h>
 #include <linux/workqueue.h>
 #include <linux/device.h>
 #include <linux/times.h>
@@ -253,6 +254,12 @@
 cond_syscall(sys_epoll_wait)
 cond_syscall(sys_pciconfig_read)
 cond_syscall(sys_pciconfig_write)
+cond_syscall(sys_cpuset_create);
+cond_syscall(sys_cpuset_destroy);
+cond_syscall(sys_cpuset_alloc);
+cond_syscall(sys_cpuset_attach);
+cond_syscall(sys_cpuset_getfreecpus);
+
 
 static int set_one_prio(struct task_struct *p, int niceval, int error)
 {


  parent reply	other threads:[~2003-10-21 23:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-13 13:07 [RFC] cpuset proposal Simon Derr
2003-10-21 23:20 ` (1/4) [PATCH] cpuset -- 2.6.0-test8 Stephen Hemminger
2003-10-22  0:08   ` William Lee Irwin III
2003-10-22 14:34     ` Simon Derr
2003-10-22 14:57       ` William Lee Irwin III
2003-10-21 23:20 ` (2/4) [PATCH] cpuset - Kconfig Stephen Hemminger
2003-10-21 23:20 ` Stephen Hemminger [this message]
2003-10-21 23:20 ` (4/4) [PATCH] cpuset -- seqfile change Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031021162032.723c247b.shemminger@osdl.org \
    --to=shemminger@osdl.org \
    --cc=Simon.Derr@bull.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).