diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-12-16 20:48:21 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-18 15:12:53 -0800 |
commit | 809c67059162e7ba85c61a83ad7547b4ffbb1e6e (patch) | |
tree | 4fbd0d0a6421a0940ef7a9bbedb1726a40e17b64 /lib/ts_bm.c | |
parent | fa7b28c11bbf389617327ad4dd69bbbbbc16a8b4 (diff) |
test_rhashtable: remove semaphore usage
This is one of only two files that initialize a semaphore to a negative
value. We don't really need the two semaphores here at all, but can do
the same thing in more conventional and more effient way, by using a
single waitqueue and an atomic thread counter.
This gets us a little bit closer to eliminating classic semaphores from
the kernel. It also fixes a corner case where we fail to continue after
one of the threads fails to start up.
An alternative would be to use a split kthread_create()+wake_up_process()
and completely eliminate the separate synchronization.
Acked-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/ts_bm.c')
0 files changed, 0 insertions, 0 deletions