From patchwork Mon Nov 23 10:49:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Benson X-Patchwork-Id: 9780 Received: (qmail 73047 invoked by alias); 23 Nov 2015 10:50:07 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 72907 invoked by uid 89); 23 Nov 2015 10:50:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com From: Gary Benson To: libc-alpha@sourceware.org Subject: [PATCH 1/2] Fix inaccurate comment in td_ta_thr_iter Date: Mon, 23 Nov 2015 10:49:54 +0000 Message-Id: <1448275795-6283-2-git-send-email-gbenson@redhat.com> In-Reply-To: <1448275795-6283-1-git-send-email-gbenson@redhat.com> References: <1448275795-6283-1-git-send-email-gbenson@redhat.com> 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(-) 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);