Re: [ACPI] ACPI global lock macros
From: Andi Kleen
Date: Thu Dec 11 2003 - 03:08:05 EST
On Thu, 11 Dec 2003 15:06:10 +0800
"Yu, Luming" <luming.yu@xxxxxxxxx> wrote:
>
> Above code have a bug! Considering below code:
>
> u8 acquired = FALSE;
>
> ACPI_ACQUIRE_GLOBAL_LOC(acpi_gbl_common_fACS.global_lock, acquired);
> if(acquired) {
> ....
> }
>
> Gcc will complain " ERROR: '%cl' not allowed with sbbl ". And I think any other compiler will
> complain that too !
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)
I tried to fix it on x86-64, but eventually gave up and adopted the IA64 C version.
-Andi
-
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/