]>
git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - repair/threads.c
1 // SPDX-License-Identifier: GPL-2.0
7 #include "err_protos.h"
17 * block delivery of progress report signal to all threads
19 sigemptyset(&blocked
);
20 sigaddset(&blocked
, SIGHUP
);
21 sigaddset(&blocked
, SIGALRM
);
22 pthread_sigmask(SIG_BLOCK
, &blocked
, NULL
);
30 unsigned int nworkers
)
34 err
= -workqueue_create(wq
, mp
, nworkers
);
36 do_error(_("cannot create worker threads, error = [%d] %s\n"),
43 workqueue_func_t func
,
49 err
= -workqueue_add(wq
, func
, agno
, arg
);
51 do_error(_("cannot allocate worker item, error = [%d] %s\n"),
61 err
= -workqueue_terminate(wq
);
63 do_error(_("cannot terminate worker item, error = [%d] %s\n"),
65 workqueue_destroy(wq
);