Skip to content
This repository has been archived by the owner on Feb 5, 2022. It is now read-only.

Commit

Permalink
nptl_db: Remove stale match_pid' parameter from iterate_thread_list'
Browse files Browse the repository at this point in the history
Complement commit c579f48 ("Remove cached PID/TID in clone") and
remove the `match_pid' parameter not used by `iterate_thread_list' any
longer.  Update call sites accordingly.

	* nptl_db/td_ta_thr_iter.c (iterate_thread_list): Remove
	`match_pid' parameter.
	(td_ta_thr_iter): Update accordingly.
  • Loading branch information
Maciej W. Rozycki committed Mar 1, 2018
1 parent 1efe135 commit b717c14
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
2018-03-01 Maciej W. Rozycki <macro@mips.com>

* nptl_db/td_ta_thr_iter.c (iterate_thread_list): Remove
`match_pid' parameter.
(td_ta_thr_iter): Update accordingly.

2018-03-01 Florian Weimer <fweimer@redhat.com>

* nptl/Makefile (install-lib-ldscripts): Remove.
Expand Down
7 changes: 3 additions & 4 deletions nptl_db/td_ta_thr_iter.c
Expand Up @@ -23,7 +23,7 @@
static td_err_e
iterate_thread_list (td_thragent_t *ta, td_thr_iter_f *callback,
void *cbdata_p, td_thr_state_e state, int ti_pri,
psaddr_t head, bool fake_empty, pid_t match_pid)
psaddr_t head, bool fake_empty)
{
td_err_e err;
psaddr_t next, ofs;
Expand Down Expand Up @@ -133,18 +133,17 @@ td_ta_thr_iter (const td_thragent_t *ta_arg, td_thr_iter_f *callback,
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);
if (err == TD_OK)
err = iterate_thread_list (ta, callback, cbdata_p, state, ti_pri,
list, true, pid);
list, true);

/* And the threads with stacks allocated by the implementation. */
if (err == TD_OK)
err = DB_GET_SYMBOL (list, ta, stack_used);
if (err == TD_OK)
err = iterate_thread_list (ta, callback, cbdata_p, state, ti_pri,
list, false, pid);
list, false);

return err;
}

0 comments on commit b717c14

Please sign in to comment.