All of lore.kernel.org
 help / color / mirror / Atom feed
From: Varsha Rao <rvarsha016@gmail.com>
To: mawilcox@microsoft.com
Cc: outreachy-kernel <outreachy-kernel@googlegroups.com>
Subject: [PATCH v3 1/5] include: linux: pid: Update documentation.
Date: Tue, 28 Mar 2017 15:38:02 +0530	[thread overview]
Message-ID: <58da3608.0dd6620a.8d4b4.0d2b@mx.google.com> (raw)
In-Reply-To: <cover.1490695255.git.rvarsha016@gmail.com>

This patch adds comments to update documentation.

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
---
Changes in v3:
- Changed comment style.

Changes in v2:
- Keep original comments.
- Modified commit message.

 include/linux/pid.h | 31 ++++++++++++++++++++++++++-----
 1 file changed, 26 insertions(+), 5 deletions(-)

diff --git a/include/linux/pid.h b/include/linux/pid.h
index 4d17931..ea90c1f 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -5,10 +5,10 @@
 
 enum pid_type
 {
-	PIDTYPE_PID,
-	PIDTYPE_PGID,
-	PIDTYPE_SID,
-	PIDTYPE_MAX
+	PIDTYPE_PID, /* Process ID */
+	PIDTYPE_PGID, /* Process group ID */
+	PIDTYPE_SID, /* Process session ID */
+	PIDTYPE_MAX /* Number of ID types */
 };
 
 /*
@@ -42,11 +42,15 @@ enum pid_type
 
 
 /*
+ * struct upid - Get PID for particular namespace.
+ * @nr: Pid value.
+ * @ns: Represents the namespace to which pid value belongs.
+ * @pid_chain: Hash chain.
+ *
  * struct upid is used to get the id of the struct pid, as it is
  * seen in particular namespace. Later the struct pid is found with
  * find_pid_ns() using the int nr and struct pid_namespace *ns.
  */
-
 struct upid {
 	/* Try to keep pid_chain in the same cacheline as nr for find_vpid */
 	int nr;
@@ -54,6 +58,14 @@ struct upid {
 	struct hlist_node pid_chain;
 };
 
+/*
+ * struct pid
+ * @count: Reference counter.
+ * @level: Number of namespaces in which the process is visible.
+ * @tasks: Lists of tasks.
+ * @rcu: RCU helper.
+ * @numbers: Instance of upid for each level.
+ */
 struct pid
 {
 	atomic_t count;
@@ -66,12 +78,21 @@ struct pid
 
 extern struct pid init_struct_pid;
 
+/*
+ * struct pid_link - Per process linkage into hash tables.
+ * @node: List element.
+ * @pid: Pointer to the struct pid of the process.
+ */
 struct pid_link
 {
 	struct hlist_node node;
 	struct pid *pid;
 };
 
+/*
+ * get_pid() - Checks availability of process id and if available assigns
+ * process ID.
+ */
 static inline struct pid *get_pid(struct pid *pid)
 {
 	if (pid)
-- 
2.9.3



       reply	other threads:[~2017-03-28 10:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1490695255.git.rvarsha016@gmail.com>
2017-03-28 10:08 ` Varsha Rao [this message]
2017-03-28 10:11 ` [PATCH v3 2/5] include: linux: pid: Move open brace to previous line Varsha Rao
2017-03-28 10:12 ` [PATCH v3 3/5] include: linux: pid: Add identifier to function definition argument Varsha Rao
2017-03-28 10:14 ` [PATCH v3 4/5] include: linux: pid: Add a blank line after declarations Varsha Rao
2017-03-28 10:15 ` [PATCH v3 5/5] include: linux: pid: Remove space before tabs Varsha Rao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58da3608.0dd6620a.8d4b4.0d2b@mx.google.com \
    --to=rvarsha016@gmail.com \
    --cc=mawilcox@microsoft.com \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.