* question: attribute 'require_context'
@ 2011-09-10 0:47 H Hartley Sweeten
2011-09-10 0:54 ` Randy Dunlap
0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2011-09-10 0:47 UTC (permalink / raw)
To: Linux Kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: question: attribute 'require_context'
2011-09-10 0:47 question: attribute 'require_context' H Hartley Sweeten
@ 2011-09-10 0:54 ` Randy Dunlap
0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2011-09-10 0:54 UTC (permalink / raw)
To: H Hartley Sweeten; +Cc: Linux Kernel
On 09/09/11 17:47, H Hartley Sweeten wrote:
> 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?
No, it's a proposed change (patch) to sparse.
You can see all sparse mailing list messages about that patch and other
questions about it by searching the linux-sparse archives at marc.info:
http://marc.info/?l=linux-sparse&w=2&r=1&s=require_context&q=b
--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-10 0:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-10 0:47 question: attribute 'require_context' H Hartley Sweeten
2011-09-10 0:54 ` Randy Dunlap
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.