Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1426952

Re: [PATCH v9 02/12] kthread: Kthread worker API cleanup

From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v9 02/12] kthread: Kthread worker API cleanup
Date 2016-06-20 21:30 +0200
Message-ID <rMd3r-3UC-11@gated-at.bofh.it> (permalink)
References <rKDv3-7Hj-3@gated-at.bofh.it> <rKDv3-7Hj-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,

On Thu, Jun 16, 2016 at 01:17:21PM +0200, Petr Mladek wrote:
> __init_kthread_worker()		-> __kthread_init_worker()
> init_kthread_worker()		-> kthread_init_worker()
> init_kthread_work()		-> kthread_init_work()
> insert_kthread_work()		-> kthread_insert_work()
> queue_kthread_work()		-> kthread_queue_work()
> flush_kthread_work()		-> kthread_flush_work()
> flush_kthread_worker()		-> kthread_flush_worker()

I wonder whether the subsystem name here is more the whole
kthread_worker rather than just kthread but I can't think of a good
single syllable abbrev for it.  It's a bikeshedding anyway.

> Note that the names of DEFINE_KTHREAD_WORK*() macros stay
> as they are. It is common that the "DEFINE_" prefix has
> precedence over the subsystem names.
> 
> INIT_() macros are similar to DEFINE_. Therefore this patch
> renames:
> 
> KTHREAD_WORKER_INIT()		-> INIT_KTHREAD_WORKER()
> KTHREAD_WORK_INIT()		-> INIT_KTHREAD_WORK()

So, they're different.  In the above cases, INIT doesn't stand for the
verb INITIALIZE but its noun form INITIALIZER.  These aren't
operations and thus different from DEFINE_XXX().

	kthread_init_worker	= kthread: initialize worker
	KTHREAD_WORKER_INIT	= kthread: worker initializer

I think it makes a lot more sense to keep _INIT at the end for these.

Thanks.

-- 
tejun

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH v9 02/12] kthread: Kthread worker API cleanup Petr Mladek <pmladek@suse.com> - 2016-06-16 13:20 +0200
  Re: [PATCH v9 02/12] kthread: Kthread worker API cleanup Tejun Heo <tj@kernel.org> - 2016-06-20 21:30 +0200

csiph-web