lkml.org 
[lkml]   [2010]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
From
Subject[PATCH 2/3] resource: move kernel function inside __KERNEL__
Date
It is an internal function. Move it inside __KERNEL__ ifdef, along
with task_struct declaration.

Then we get:
--- /usr/include/linux/resource.h 2009-09-14 15:09:29.000000000 +0200
+++ usr/include/linux/resource.h 2010-01-04 11:30:54.000000000 +0100
@@ -3,8 +3,6 @@

#include <linux/time.h>

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

-int getrusage(struct task_struct *p, int who, struct rusage *ru);

#endif
***********
include/linux/Kbuild is untouched, since unifdef is run even on
headers-y nowadays.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
include/linux/resource.h | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/linux/resource.h b/include/linux/resource.h
index 40fc7e6..f1e914e 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,6 +68,12 @@ struct rlimit {
*/
#include <asm/resource.h>

+#ifdef __KERNEL__
+
+struct task_struct;
+
int getrusage(struct task_struct *p, int who, struct rusage __user *ru);

+#endif /* __KERNEL__ */
+
#endif
--
1.6.5.7


\
 
 \ /
  Last update: 2010-01-04 11:51    [W:0.108 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site