[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_3E4E6D2AD8C21CCA18E9A4E7E1578C94EF06@qq.com>
Date: Tue, 16 Dec 2025 17:04:16 +0800
From: Licay <licayy@...mail.com>
To: ywen.chen@...mail.com,
akpm@...ux-foundation.org
Cc: andrealmeid@...lia.com,
bigeasy@...utronix.de,
colin.i.king@...il.com,
dave@...olabs.net,
dvhart@...radead.org,
justinstitt@...gle.com,
kernel-team@...roid.com,
linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org,
luto@....edu,
mingo@...hat.com,
morbo@...gle.com,
nathan@...nel.org,
ndesaulniers@...gle.com,
peterz@...radead.org,
shuah@...nel.org,
tglx@...utronix.de,
usama.anjum@...labora.com,
Licay <licayy@...mail.com>
Subject: [PATCH v2 2/5] selftests/futex: use pthread_join to reclaim thread resources
> When creating a thread using pthread_create, you should use
> pthread_join to free its resources.
>
> Signed-off-by: Yuwen Chen <ywen.chen@...mail.com>
Reviewed-by: Licay <licayy@...mail.com>
> ---
> tools/testing/selftests/futex/functional/futex_requeue.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/tools/testing/selftests/futex/functional/futex_requeue.c b/tools/testing/selftests/futex/functional/futex_requeue.c
> index 1807465de2144..7a22458c7fc96 100644
> --- a/tools/testing/selftests/futex/functional/futex_requeue.c
> +++ b/tools/testing/selftests/futex/functional/futex_requeue.c
> @@ -62,6 +62,8 @@ TEST(requeue_single)
> } else {
> ksft_test_result_pass("futex_requeue simple succeeds\n");
> }
> +
> + pthread_join(waiter, NULL);
> }
>
> TEST(requeue_multiple)
> @@ -101,6 +103,9 @@ TEST(requeue_multiple)
> } else {
> ksft_test_result_pass("futex_requeue many succeeds\n");
> }
> +
> + for (i = 0; i < 10; i++)
> + pthread_join(waiter[i], NULL);
> }
>
> TEST_HARNESS_MAIN
> --
> 2.34.1
>
Powered by blists - more mailing lists