mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-02 00:00:03 +03:00
Stop workqueue threads at process exit time, to make valgrind happy.
Signed-off-by: Justin Husted <sigstop@gmail.com>
This commit is contained in:
parent
b20e160735
commit
97c6f60222
@ -307,3 +307,16 @@ static void wq_init(void)
|
|||||||
BUG_ON(!system_wq || !system_highpri_wq || !system_long_wq ||
|
BUG_ON(!system_wq || !system_highpri_wq || !system_long_wq ||
|
||||||
!system_unbound_wq || !system_freezable_wq);
|
!system_unbound_wq || !system_freezable_wq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__attribute__((destructor(102)))
|
||||||
|
static void wq_cleanup(void)
|
||||||
|
{
|
||||||
|
destroy_workqueue(system_freezable_wq);
|
||||||
|
destroy_workqueue(system_unbound_wq);
|
||||||
|
destroy_workqueue(system_long_wq);
|
||||||
|
destroy_workqueue(system_highpri_wq);
|
||||||
|
destroy_workqueue(system_wq);
|
||||||
|
|
||||||
|
system_wq = system_highpri_wq = system_long_wq = system_unbound_wq =
|
||||||
|
system_freezable_wq = NULL;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user