[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160609172234.GW30154@twins.programming.kicks-ass.net>
Date: Thu, 9 Jun 2016 19:22:34 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Petr Mladek <pmladek@...e.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Oleg Nesterov <oleg@...hat.com>, Tejun Heo <tj@...nel.org>,
Ingo Molnar <mingo@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Josh Triplett <josh@...htriplett.org>,
Thomas Gleixner <tglx@...utronix.de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jiri Kosina <jkosina@...e.cz>, Borislav Petkov <bp@...e.de>,
Michal Hocko <mhocko@...e.cz>, linux-mm@...ck.org,
Vlastimil Babka <vbabka@...e.cz>, linux-api@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 02/12] kthread: Kthread worker API cleanup
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.
Powered by blists - more mailing lists