Messages in this thread | | | Date | Thu, 11 Dec 2003 00:27:54 -0800 | From | Paul Menage <> | Subject | Re: [ACPI] ACPI global lock macros |
| |
Andi Kleen wrote: > > It has even more bugs, e.g. it doesn't tell gcc that GLptr is modified (this hurts with > newer versions that optimize more aggressively)
GLptr itself isn't modified - *GLptr is, but none of the actual C code accesses *GLptr, so how does this affect the compiler's optimization efforts? Is it because gcc treats the call as a pure function that maps a pointer to an acquired value, and hence believes that it can move it around? There aren't any instances of ACPI_ACQUIRE_GLOBAL_LOCK being called twice in the same function, so it wouldn't be able to cache a result. But I agree that it ought to declare that it clobbers memory.
Paul
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |