aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Lehmer <alehmer@google.com>2017-09-28 15:28:11 -0700
committerAndrew Lehmer <alehmer@google.com>2017-09-28 15:28:25 -0700
commit0fdd4faef3aa46beb89c8a03be3ae1da42d61346 (patch)
treed44b7edd7efceeafecafca43a5c21d4c88a41896 /include/linux
parent8ac3b7cbf14fa5d328213b1592efce6ae16f1167 (diff)
parentf2807be44c420478c7afc7cc296217521d5e623c (diff)
Merge branch 'android-x86_64-fugu-3.10-nyc-mr1' into android-x86_64-fugu-3.10-ocHEADo8.0
November 2017.1 Bug: 65558954 Change-Id: I3ccc21349b7ac04252c274663a04317a27597cb1 Signed-off-by: Andrew Lehmer <alehmer@google.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pid.h4
-rw-r--r--include/linux/sched.h17
2 files changed, 13 insertions, 8 deletions
diff --git a/include/linux/pid.h b/include/linux/pid.h
index a089a3c447f..ed7b1f73192 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -8,7 +8,9 @@ enum pid_type
PIDTYPE_PID,
PIDTYPE_PGID,
PIDTYPE_SID,
- PIDTYPE_MAX
+ PIDTYPE_MAX,
+ /* only valid to __task_pid_nr_ns() */
+ __PIDTYPE_TGID
};
/*
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 742d87c5831..c0b447aa440 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1517,13 +1517,6 @@ static inline pid_t task_tgid_nr(struct task_struct *tsk)
return tsk->tgid;
}
-pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns);
-
-static inline pid_t task_tgid_vnr(struct task_struct *tsk)
-{
- return pid_vnr(task_tgid(tsk));
-}
-
static inline pid_t task_pgrp_nr_ns(struct task_struct *tsk,
struct pid_namespace *ns)
@@ -1548,6 +1541,16 @@ static inline pid_t task_session_vnr(struct task_struct *tsk)
return __task_pid_nr_ns(tsk, PIDTYPE_SID, NULL);
}
+static inline pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
+{
+ return __task_pid_nr_ns(tsk, __PIDTYPE_TGID, ns);
+}
+
+static inline pid_t task_tgid_vnr(struct task_struct *tsk)
+{
+ return __task_pid_nr_ns(tsk, __PIDTYPE_TGID, NULL);
+}
+
/* obsolete, do not use */
static inline pid_t task_pgrp_nr(struct task_struct *tsk)
{