Re: [PATCH] linux/compiler.h: Add __must_hold macro for functionscalled with a lock held

From: Andrew Morton
Date: Tue Oct 09 2012 - 16:06:32 EST


On Sun, 7 Oct 2012 19:06:10 -0700
Josh Triplett <josh@xxxxxxxxxxxxxxxx> wrote:

> linux/compiler.h has macros to denote functions that acquire or release
> locks, but not to denote functions called with a lock held that return
> with the lock still held. Add a __must_hold macro to cover that case.

hum. How does this work? Any code examples and sample sparse output?
Does it apply to all lock types, etc?

IOW, where is all this stuff documented?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/