Skip to content

Commit

Permalink
resource: move kernel function inside __KERNEL__
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby committed Jan 4, 2010
1 parent 17740d8 commit 96d07d2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions include/linux/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

#include <linux/time.h>

struct task_struct;

/*
* Resource control/accounting header file for linux
*/
Expand Down Expand Up @@ -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

0 comments on commit 96d07d2

Please sign in to comment.