On Thu, Feb 05 2026 at 10:09, Yuwen Chen wrote:
> TEST(requeue_single)
> {
> + struct futex_thread waiter;
> volatile futex_t _f1 = 0;
> volatile futex_t f2 = 0;
> - pthread_t waiter[10];
>
> f1 = &_f1;
>
> /*
> * Requeue a waiter from f1 to f2, and wake f2.
> */
> - ASSERT_EQ(0, pthread_create(&waiter[0], NULL, waiterfn, NULL));
> -
> - usleep(WAKE_WAIT_US);
> + ASSERT_EQ(0, futex_thread_create(&waiter, waiterfn, NULL));
> + futex_wait_for_thread(&waiter);
This is a horrible hack. If that wait fails, there is no point to
continue.