Thread (27 messages) 27 messages, 6 authors, 2012-03-28

Re: [PATCH 10/10] oom: Make find_lock_task_mm() sparse-aware

From: Peter Zijlstra <hidden>
Date: 2012-03-24 16:44:13
Also in: linux-arm-kernel, linux-mm, linux-sh, linux-um, lkml

On Sat, 2012-03-24 at 20:21 +0400, Anton Vorontsov wrote:
Just wonder how do you see the feature implemented?
=20
Something like this?
=20
#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);
=20
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help