Skip to contentSkip to conversation

trivial: helpful task_struct remarks

PATCH New Geunsik Lim 1 participant 1 message Aug 17, 2011 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trivial: helpful task_struct remarks

From: Geunsik Lim <[email protected]>

This is trivial patch for helpful description of task_struct elements. '???' remark is not good as a description of data structure. And, append description information about the meanings of pid and tgid.

---
 include/linux/sched.h |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
include/linux/sched.h +3 -4
index 4ac2c05..1a078f8 100644
@@ -1293,8 +1293,7 @@ struct task_struct {
 	int exit_code, exit_signal;
 	int pdeath_signal;  /*  The signal sent when the parent dies  */
 	unsigned int jobctl;	/* JOBCTL_*, siglock protected */
-	/* ??? */
-	unsigned int personality;
+	unsigned int personality; /* Personality types of process */
 	unsigned did_exec:1;
 	unsigned in_execve:1;	/* Tell the LSMs that the process is doing an
 				 * execve */
@@ -1305,8 +1304,8 @@ struct task_struct {
 	unsigned sched_reset_on_fork:1;
 	unsigned sched_contributes_to_load:1;
 
-	pid_t pid;
-	pid_t tgid;
+	pid_t pid; /* Process ID, return value of gettid system call */
+	pid_t tgid; /* Thread group ID, return value of getpid system call */
 
 #ifdef CONFIG_CC_STACKPROTECTOR
 	/* Canary value for the -fstack-protector gcc feature */
Signature · 1 line
1.7.1