lkml.org 
[lkml]   [2018]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] test_rhashtable: remove semaphore usage
From
From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 10 Dec 2018 22:17:20 +0100

> @@ -635,8 +636,9 @@ static int threadfunc(void *data)
> int i, step, err = 0, insert_retries = 0;
> struct thread_data *tdata = data;
>
> - up(&prestart_sem);
> - if (down_interruptible(&startup_sem))
> + if (atomic_dec_and_test(&startup_count))
> + wake_up(&startup_wait);
> + if (wait_event_interruptible(startup_wait, atomic_read(&startup_count) == -1))
> pr_err(" thread[%d]: down_interruptible failed\n", tdata->id);

Arnd, please adjust this pr_err() text to match the new code as pointed out by
Phil Sutter.

Thank you.

\
 
 \ /
  Last update: 2018-12-14 22:26    [W:0.046 / U:1.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site