[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1332607407.16159.51.camel@twins>
Date: Sat, 24 Mar 2012 17:43:27 +0100
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Anton Vorontsov <anton.vorontsov@...aro.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Oleg Nesterov <oleg@...hat.com>,
Russell King <linux@....linux.org.uk>,
Mike Frysinger <vapier@...too.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Richard Weinberger <richard@....at>,
Paul Mundt <lethal@...ux-sh.org>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
John Stultz <john.stultz@...aro.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
uclinux-dist-devel@...ckfin.uclinux.org,
linuxppc-dev@...ts.ozlabs.org, linux-sh@...r.kernel.org,
user-mode-linux-devel@...ts.sourceforge.net, linux-mm@...ck.org,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 10/10] oom: Make find_lock_task_mm() sparse-aware
On Sat, 2012-03-24 at 20:21 +0400, Anton Vorontsov wrote:
> Just wonder how do you see the feature implemented?
>
> Something like this?
>
> #define __ret_cond_locked(l, c) __attribute__((ret_cond_locked(l, c)))
> #define __ret_value __attribute__((ret_value))
> #define __ret_locked_nonnull(l) __ret_cond_locked(l, __ret_value);
>
> extern struct task_struct *find_lock_task_mm(struct task_struct *p)
> __ret_locked_nonnull(&__ret_value->alloc_lock);
Yeah, see the email I just CC'ed you on to linux-sparse.
Basically extend __attribute__((context())) to allow things similar to
what you proposed.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists