From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [RFC PATCH 02/18] kthread: Add API for iterant kthreads Date: Tue, 9 Jun 2015 15:23:49 +0900 Message-ID: <20150609062349.GW21465@mtj.duckdns.org> References: <1433516477-5153-1-git-send-email-pmladek@suse.cz> <1433516477-5153-3-git-send-email-pmladek@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1433516477-5153-3-git-send-email-pmladek-AlSwsSmVLrQ@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Petr Mladek Cc: Andrew Morton , Oleg Nesterov , Ingo Molnar , Peter Zijlstra , Richard Weinberger , Steven Rostedt , David Woodhouse , linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Trond Myklebust , Anna Schumaker , linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Chris Mason , "Paul E. McKenney" , Thomas Gleixner , Linus Torvalds , Jiri Kosina , Borislav Petkov , Michal Hocko , live-patching-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-api@vger.kernel.org Hello, Petr. On Fri, Jun 05, 2015 at 05:01:01PM +0200, Petr Mladek wrote: > +static int kthread_iterant_fn(void *kti_ptr) > +{ > + struct kthread_iterant *kti = kti_ptr; > + void *data = kti->data; > + > + if (kti->init) > + kti->init(data); > + > + do { > + if (kti->func) > + kti->func(data); Is supporting kthread_iterant w/o the body function intentional? If so, did you have anything specific on mind for it? I don't think it matters either way. Just curious how this came to be. Thanks. -- tejun