mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Licay <licayy@foxmail.com>
To: ywen.chen@foxmail.com, akpm@linux-foundation.org
Cc: andrealmeid@igalia.com, bigeasy@linutronix.de,
	colin.i.king@gmail.com, dave@stgolabs.net, dvhart@infradead.org,
	justinstitt@google.com, kernel-team@android.com,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	luto@mit.edu, mingo@redhat.com, morbo@google.com,
	nathan@kernel.org, ndesaulniers@google.com, peterz@infradead.org,
	shuah@kernel.org, tglx@linutronix.de, usama.anjum@collabora.com,
	Licay <licayy@foxmail.com>
Subject: [PATCH v2 1/5] selftests/futex: reduce array declarations in the requeue_single
Date: Tue, 16 Dec 2025 16:38:06 +0800	[thread overview]
Message-ID: <tencent_F566A4499E755FC452693B7DA93F0BEE2808@qq.com> (raw)
In-Reply-To: <tencent_A4A4E388AEB0E748796A5FF75DB44514DC08@qq.com>

> In the requeue_single function, the variable "waits" only uses
> one element. There is no need to use an array.
>
> Signed-off-by: Yuwen Chen <ywen.chen@foxmail.com>

Reviewed-by: Licay <licayy@foxmail.com>
> ---
>  tools/testing/selftests/futex/functional/futex_requeue.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/futex/functional/futex_requeue.c b/tools/testing/selftests/futex/functional/futex_requeue.c
> index 69e2555b60399..1807465de2144 100644
> --- a/tools/testing/selftests/futex/functional/futex_requeue.c
> +++ b/tools/testing/selftests/futex/functional/futex_requeue.c
> @@ -33,7 +33,7 @@ TEST(requeue_single)
>  {
>          volatile futex_t _f1 = 0;
>          volatile futex_t f2 = 0;
> -        pthread_t waiter[10];
> +        pthread_t waiter;
>          int res;
>
>          f1 = &_f1;
> @@ -41,7 +41,7 @@ TEST(requeue_single)
>          /*
>           * Requeue a waiter from f1 to f2, and wake f2.
>           */
> -        if (pthread_create(&waiter[0], NULL, waiterfn, NULL))
> +        if (pthread_create(&waiter, NULL, waiterfn, NULL))
>                  ksft_exit_fail_msg("pthread_create failed\n");
>
>          usleep(WAKE_WAIT_US);
> --
> 2.34.1


  reply	other threads:[~2025-12-16  8:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-12  3:21 [PATCH v2 0/5] selftests/futex: fix the issue of abnormal test results caused by thread timing Yuwen Chen
2025-12-12  3:24 ` [PATCH v2 1/5] selftests/futex: reduce array declarations in the requeue_single Yuwen Chen
2025-12-16  8:38   ` Licay [this message]
2025-12-12  3:24 ` [PATCH v2 2/5] selftests/futex: use pthread_join to reclaim thread resources Yuwen Chen
2025-12-16  9:04   ` Licay
2025-12-12  3:25 ` [PATCH v2 3/5] selftests/futex: read atomic variable value with atomic_read Yuwen Chen
2025-12-16  9:14   ` Licay
2025-12-12  3:25 ` [PATCH v2 4/5] selftests/futex: introduce the declaration of atomic_t from types.h Yuwen Chen
2025-12-16  9:17   ` Licay
2025-12-12  3:25 ` [PATCH v2 5/5] selftests/futex: fix the issue of abnormal test results caused by thread timing Yuwen Chen
2025-12-16  9:19   ` Licay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_F566A4499E755FC452693B7DA93F0BEE2808@qq.com \
    --to=licayy@foxmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrealmeid@igalia.com \
    --cc=bigeasy@linutronix.de \
    --cc=colin.i.king@gmail.com \
    --cc=dave@stgolabs.net \
    --cc=dvhart@infradead.org \
    --cc=justinstitt@google.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=luto@mit.edu \
    --cc=mingo@redhat.com \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=peterz@infradead.org \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=usama.anjum@collabora.com \
    --cc=ywen.chen@foxmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®