From: Peter Zijlstra <peterz@infradead.org>
To: Petr Mladek <pmladek@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Oleg Nesterov <oleg@redhat.com>, Tejun Heo <tj@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Josh Triplett <josh@joshtriplett.org>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Jiri Kosina <jkosina@suse.cz>, Borislav Petkov <bp@suse.de>,
Michal Hocko <mhocko@suse.cz>,
linux-mm@kvack.org, Vlastimil Babka <vbabka@suse.cz>,
linux-api@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 02/12] kthread: Kthread worker API cleanup
Date: Thu, 9 Jun 2016 19:22:34 +0200 [thread overview]
Message-ID: <20160609172234.GW30154@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1465480326-31606-3-git-send-email-pmladek@suse.com>
On Thu, Jun 09, 2016 at 03:51:56PM +0200, Petr Mladek wrote:
> -#define DEFINE_KTHREAD_WORKER(worker) \
> - struct kthread_worker worker = KTHREAD_WORKER_INIT(worker)
> +#define KTHREAD_DECLARE_WORKER(worker) \
> + struct kthread_worker worker = KTHREAD_INIT_WORKER(worker)
>
> -#define DEFINE_KTHREAD_WORK(work, fn) \
> - struct kthread_work work = KTHREAD_WORK_INIT(work, fn)
> +#define KTHREAD_DECLARE_WORK(work, fn) \
> + struct kthread_work work = KTHREAD_INIT_WORK(work, fn)
>
> /*
> * kthread_worker.lock needs its own lockdep class key when defined on
> * stack with lockdep enabled. Use the following macros in such cases.
> */
> #ifdef CONFIG_LOCKDEP
> -# define KTHREAD_WORKER_INIT_ONSTACK(worker) \
> - ({ init_kthread_worker(&worker); worker; })
> -# define DEFINE_KTHREAD_WORKER_ONSTACK(worker) \
> - struct kthread_worker worker = KTHREAD_WORKER_INIT_ONSTACK(worker)
> +# define KTHREAD_INIT_WORKER_ONSTACK(worker) \
> + ({ kthread_init_worker(&worker); worker; })
> +# define KTHREAD_DECLARE_WORKER_ONSTACK(worker) \
> + struct kthread_worker worker = KTHREAD_INIT_WORKER_ONSTACK(worker)
> #else
> -# define DEFINE_KTHREAD_WORKER_ONSTACK(worker) DEFINE_KTHREAD_WORKER(worker)
> +# define KTHREAD_DECLARE_WORKER_ONSTACK(worker) KTHREAD_DECLARE_WORKER(worker)
> #endif
As Steven already said; these are very much definitions _not_
declarations.
next prev parent reply other threads:[~2016-06-09 17:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-09 13:51 [PATCH v8 00/12] kthread: Kthread worker API improvements Petr Mladek
2016-06-09 13:51 ` [PATCH v8 01/12] kthread: Rename probe_kthread_data() to kthread_probe_data() Petr Mladek
2016-06-09 13:51 ` [PATCH v8 02/12] kthread: Kthread worker API cleanup Petr Mladek
2016-06-09 15:07 ` Steven Rostedt
2016-06-10 22:29 ` Andrew Morton
2016-06-13 15:13 ` Petr Mladek
2016-06-13 16:03 ` Steven Rostedt
2016-06-09 17:22 ` Peter Zijlstra [this message]
2016-06-09 13:51 ` [PATCH v8 03/12] kthread/smpboot: Do not park in kthread_create_on_cpu() Petr Mladek
2016-06-09 13:51 ` [PATCH v8 04/12] kthread: Allow to call __kthread_create_on_node() with va_list args Petr Mladek
2016-06-09 13:51 ` [PATCH v8 05/12] kthread: Add kthread_create_worker*() Petr Mladek
2016-06-09 13:52 ` [PATCH v8 06/12] kthread: Add kthread_drain_worker() Petr Mladek
2016-06-09 13:52 ` [PATCH v8 07/12] kthread: Add kthread_destroy_worker() Petr Mladek
2016-06-09 13:52 ` [PATCH v8 08/12] kthread: Detect when a kthread work is used by more workers Petr Mladek
2016-06-09 13:52 ` [PATCH v8 09/12] kthread: Initial support for delayed kthread work Petr Mladek
2016-06-09 13:52 ` [PATCH v8 10/12] kthread: Allow to cancel " Petr Mladek
2016-06-09 13:52 ` [PATCH v8 11/12] kthread: Allow to modify delayed " Petr Mladek
2016-06-09 13:52 ` [PATCH v8 12/12] kthread: Better support freezable kthread workers Petr Mladek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160609172234.GW30154@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=bp@suse.de \
--cc=jkosina@suse.cz \
--cc=josh@joshtriplett.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).