[PATCH v3 12/27] resource: move kernel functions inside __KERNEL__

From: Jiri Slaby
Date: Fri Nov 27 2009 - 18:09:40 EST


These are internal functions. Move them inside __KERNEL__ ifdef.

This needs also unifdef of resource.h before installing. Change
that too.

Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
---
include/linux/Kbuild | 2 +-
include/linux/resource.h | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 1feed71..a73a9c2 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -140,7 +140,6 @@ header-y += qnxtypes.h
header-y += qnx4_fs.h
header-y += radeonfb.h
header-y += raw.h
-header-y += resource.h
header-y += romfs_fs.h
header-y += rose.h
header-y += serial_reg.h
@@ -323,6 +322,7 @@ unifdef-y += irqnr.h
unifdef-y += reboot.h
unifdef-y += reiserfs_fs.h
unifdef-y += reiserfs_xattr.h
+unifdef-y += resource.h
unifdef-y += route.h
unifdef-y += rtc.h
unifdef-y += rtnetlink.h
diff --git a/include/linux/resource.h b/include/linux/resource.h
index 08beb1a..cf8dc96 100644
--- a/include/linux/resource.h
+++ b/include/linux/resource.h
@@ -3,8 +3,6 @@

#include <linux/time.h>

-struct task_struct;
-
/*
* Resource control/accounting header file for linux
*/
@@ -70,8 +68,14 @@ struct rlimit {
*/
#include <asm/resource.h>

+#ifdef __KERNEL__
+
+struct task_struct;
+
int getrusage(struct task_struct *p, int who, struct rusage __user *ru);
int do_setrlimit(struct task_struct *tsk, unsigned int resource,
struct rlimit *new_rlim);

+#endif /* __KERNEL__ */
+
#endif
--
1.6.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/