lkml.org 
[lkml]   [2016]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 03/15] proc: export next_tgid()
Date
It's going to be used in task_diag

Signed-off-by: Andrey Vagin <avagin@openvz.org>
---
fs/proc/base.c | 6 +-----
fs/proc/internal.h | 6 ++++++
2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index 614f1d0..9e5fd1c 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -3071,11 +3071,7 @@ out:
* Find the first task with tgid >= tgid
*
*/
-struct tgid_iter {
- unsigned int tgid;
- struct task_struct *task;
-};
-static struct tgid_iter next_tgid(struct pid_namespace *ns, struct tgid_iter iter)
+struct tgid_iter next_tgid(struct pid_namespace *ns, struct tgid_iter iter)
{
struct pid *pid;

diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index 49145e2..2a2b1e6 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -304,6 +304,12 @@ extern unsigned long task_statm(struct mm_struct *,
unsigned long *, unsigned long *);
extern void task_mem(struct seq_file *, struct mm_struct *);

+struct tgid_iter {
+ unsigned int tgid;
+ struct task_struct *task;
+};
+struct tgid_iter next_tgid(struct pid_namespace *ns, struct tgid_iter iter);
+
struct task_struct *
task_next_child(struct task_struct *parent, struct task_struct *prev, unsigned int pos);

--
2.5.5
\
 
 \ /
  Last update: 2016-04-12 02:01    [W:0.118 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site