[PATCH v4] erofs-utils: lib: name worker threads erofscompressor
Gao Xiang
hsiangkao at linux.alibaba.com
Tue Mar 17 04:58:08 AEDT 2026
On 2026/3/17 01:25, Nithurshen wrote:
..
> diff --git a/lib/workqueue.c b/lib/workqueue.c
> index 18ee0f9..c924c1b 100644
> --- a/lib/workqueue.c
> +++ b/lib/workqueue.c
> @@ -3,6 +3,19 @@
> #include <stdlib.h>
> #include "erofs/workqueue.h"
>
> +#if defined(__linux__)
> +#include <sys/prctl.h>
> +#endif
> +
> +void erofs_set_thread_name(const char *name)
> +{
> + #if defined(__linux__)
nit: no indentation for all C macros. Since you'd
like to contribute more, I hope you could read the
kernel code style too.
Thanks,
Gao Xiang
> + prctl(PR_SET_NAME, name);
> + #elif defined(__APPLE__)
> + pthread_setname_np(name);
> + #endif
> +}
> +
> static void *worker_thread(void *arg)
> {
> struct erofs_workqueue *wq = arg;
More information about the Linux-erofs
mailing list