question: attribute 'require_context'

From: H Hartley Sweeten
Date: Fri Sep 09 2011 - 20:47:32 EST


Hello all,

I'm trying to do an allyesconfig build of the kernel on an old debian box
with gcc version, gcc (Debian 4.3.2-1.1) 4.3.2. Everything goes fine until
the DRBD device driver gets compiled. At that point I get a bunch of
error messages like this:

drivers/block/drbd/drbd_int.h:974:39 error: attribute 'require_context': unknown attribute

It looks like this is due to the following:

#ifdef __CHECKER__
# define __protected_by(x) __attribute__((require_context(x,1,999,"rdwr")))
# define __protected_read_by(x) __attribute__((require_context(x,1,999,"read")))
# define __protected_write_by(x) __attribute__((require_context(x,1,999,"write")))
# define __must_hold(x) __attribute__((context(x,1,1), require_context(x,1,999,"call")))
#else
# define __protected_by(x)
# define __protected_read_by(x)
# define __protected_write_by(x)
# define __must_hold(x)
#endif

Is the require_context attribute something found in a later version of gcc?

Thanks,
Hartley
--
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/