perf sched: Factor out destroy_tasks()
authorNamhyung Kim <namhyung@kernel.org>
Thu, 8 Sep 2022 22:54:48 +0000 (15:54 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 4 Oct 2022 11:55:21 +0000 (08:55 -0300)
commit165da80296ea6bc996eea4551026e39a0109f71e
treeb4575599440c1a7ca114de23dacfcd12289455cf
parentc7202d20fb4584435ce2af5ef3a7a770f79ab59e
perf sched: Factor out destroy_tasks()

Add destroy_tasks() as a counterpart of create_tasks() and put the
thread safety notations there.  After join, it destroys semaphores too.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220908225448.4105056-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-sched.c