Patchwork [1/2] Fix inaccurate comment in td_ta_thr_iter

login
register
mail settings
Submitter Gary Benson
Date Nov. 23, 2015, 10:49 a.m.
Message ID <1448275795-6283-2-git-send-email-gbenson@redhat.com>
Download mbox | patch
Permalink /patch/9780/
State New
Headers show

Comments

Gary Benson - Nov. 23, 2015, 10:49 a.m.
The second comment in td_ta_thr_iter states that the main thread is
always in __stack_user, but the main thread can be in stack_used if
__reclaim_stacks has been called.  This commit fixes this comment.
---
 nptl_db/td_ta_thr_iter.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

Patch

diff --git a/nptl_db/td_ta_thr_iter.c b/nptl_db/td_ta_thr_iter.c
index ce31462..f79a902 100644
--- a/nptl_db/td_ta_thr_iter.c
+++ b/nptl_db/td_ta_thr_iter.c
@@ -147,11 +147,11 @@  td_ta_thr_iter (const td_thragent_t *ta_arg, td_thr_iter_f *callback,
     return TD_BADTA;
 
   /* The thread library keeps two lists for the running threads.  One
-     list contains the thread which are using user-provided stacks
-     (this includes the main thread) and the other includes the
-     threads for which the thread library allocated the stacks.  We
-     have to iterate over both lists separately.  We start with the
-     list of threads with user-defined stacks.  */
+     list contains the thread which are using user-provided stacks and
+     the other includes the threads for which the thread library
+     allocated the stacks.  We have to iterate over both lists
+     separately.  We start with the list of threads with user-defined
+     stacks.  */
 
   pid_t pid = ps_getpid (ta->ph);
   err = DB_GET_SYMBOL (list, ta, __stack_user);