question on semantics
Diego Novillo
dnovillo@redhat.com
Wed May 4 20:22:00 GMT 2005
On Wed, May 04, 2005 at 04:15:41PM -0400, Diego Novillo wrote:
> Same reply I gave you before. As long as the address of your
> shared memory is outside of the function and the pointer is
> itself a global variable or gets its value from the heap, then
> calls to functions that cannot be inlined will be considered to
> clobber dereferences to the pointer.
>
In your specific case, the pointer will have to be a global
variable (not static, but truly global). The calls to
lock/unlock will not take the pointer nor the shared variable as
arguments, so GCC will get too smart for your taste.
Diego.
More information about the Gcc
mailing list